forked from Mr0grog/google-docs-to-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code linting and CI checks (Mr0grog#136)
Add Prettier + ESLint to handle code formatting automatically and warn about anything else that might be an issue. This also uses `eslint-plugin-compat` to try and ensure we don't accidentally use APIs that aren't in all the runtimes we want to support (it's not perfect, but it helps).
- Loading branch information
Showing
27 changed files
with
1,585 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"plugins": ["compat", "@stylistic/js"], | ||
|
||
"parserOptions": { | ||
"ecmaVersion": 2022, | ||
"sourceType": "module" | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
"es2022": true, | ||
"node": true | ||
}, | ||
|
||
"settings": { | ||
"browsers": "> 0.5%, last 2 versions, Firefox ESR, node >= 16, not dead, not op_mini all", | ||
"lintAllEsApis": true | ||
}, | ||
|
||
"extends": ["eslint:recommended", "plugin:compat/recommended"], | ||
|
||
"rules": { | ||
"curly": ["error", "multi-line", "consistent"], | ||
"eqeqeq": ["error", "always", { "null": "ignore" }], | ||
"@stylistic/js/max-len": [ | ||
"error", | ||
{ | ||
"code": 120, | ||
"comments": 80, | ||
"ignoreUrls": true, | ||
"ignoreTemplateLiterals": true | ||
} | ||
], | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_" | ||
} | ||
] | ||
}, | ||
|
||
"overrides": [ | ||
{ | ||
"files": ["scripts/**/*.js"], | ||
"settings": { | ||
"browsers": "node >= 16" | ||
} | ||
}, | ||
{ | ||
"files": ["test/**/*.js"], | ||
"env": { | ||
"mocha": true | ||
} | ||
}, | ||
{ | ||
"files": ["test/e2e/**/*.js"], | ||
"settings": { | ||
"browsers": "node >= 16" | ||
} | ||
}, | ||
{ | ||
"files": ["test/unit/**/*.js", "test/support/**/*.js"], | ||
"excludedFiles": ["test/support/wdio-webpack-dev-server.js"], | ||
"settings": { | ||
"browsers": "> 0.5%, last 20 versions, Firefox ESR, not dead, not op_mini all" | ||
} | ||
} | ||
], | ||
|
||
"ignorePatterns": ["scratch.*", "dist/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: "weekly" | ||
interval: 'weekly' | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: "monthly" | ||
interval: 'monthly' | ||
versioning-strategy: widen | ||
groups: | ||
# WebdriverIO frequently makes cross-ecosystem changes | ||
# that break unless updated together. | ||
wdio: | ||
patterns: | ||
- "@wdio/*" | ||
- "wdio-*" | ||
- "webdriverio" | ||
- '@wdio/*' | ||
- 'wdio-*' | ||
- 'webdriverio' | ||
rehype: | ||
patterns: | ||
- "rehype-*" | ||
- 'rehype-*' | ||
remark: | ||
patterns: | ||
- "remark-*" | ||
- 'remark-*' | ||
unified: | ||
patterns: | ||
- "unified" | ||
- "unist-*" | ||
- 'unified' | ||
- 'unist-*' | ||
webpack: | ||
patterns: | ||
- "webpack" | ||
- "webpack-*" | ||
- 'webpack' | ||
- 'webpack-*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.DS_Store | ||
|
||
node_modules | ||
dist | ||
logs | ||
temp | ||
coverage | ||
|
||
# Ignore tool versioning files -- development and testing should not be hard on | ||
# multiple versions of Node.js, so we don't want these in the repo, but it's | ||
# fine (or even good!) for contributors to use them locally. | ||
.node-version | ||
.nvmrc | ||
.tool-versions | ||
|
||
/test/fixtures/ | ||
|
||
# Prettier generates invalid HTML. | ||
*.html | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"quoteProps": "consistent", | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.