-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore/update linting workflows and dependencies (#1374)
- Loading branch information
1 parent
1d75a29
commit e0ab150
Showing
73 changed files
with
662 additions
and
1,488 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,70 @@ | ||
import babelParser from '@babel/eslint-parser'; | ||
import markdown from '@eslint/markdown'; | ||
import json from '@eslint/json'; | ||
import js from '@eslint/js'; | ||
import globals from 'globals'; | ||
import noOnlyTests from 'eslint-plugin-no-only-tests'; | ||
|
||
export default [ | ||
{ | ||
// https://github.com/eslint/eslint/discussions/18304#discussioncomment-9069706 | ||
ignores: [ | ||
'.greenwood/*', | ||
'node_modules/*', | ||
'public/*', | ||
'reports/*', | ||
'coverage/*', | ||
// 'packages/plugin-graphql/README.md', | ||
'www/**' | ||
], | ||
}, | ||
{ | ||
languageOptions: { | ||
parser: babelParser, | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
requireConfigFile: false, | ||
babelOptions: { | ||
plugins: ['@babel/plugin-syntax-import-assertions', '@babel/plugin-syntax-jsx'], | ||
}, | ||
}, | ||
globals: { | ||
...globals.browser, | ||
...globals.mocha, | ||
...globals.chai, | ||
...globals.node, | ||
}, | ||
}, | ||
rules: { | ||
...js.configs.recommended.rules, | ||
// turn this off for Prettier | ||
'no-irregular-whitespace': 'off', | ||
'no-only-tests/no-only-tests': 'error', | ||
}, | ||
plugins: { | ||
'no-only-tests': noOnlyTests, | ||
}, | ||
}, | ||
{ | ||
// https://github.com/eslint/json#recommended-configuration | ||
files: ['**/*.json'], | ||
ignores: ['package-lock.json'], | ||
language: 'json/json', | ||
rules: json.configs.recommended.rules, | ||
plugins: { | ||
json, | ||
}, | ||
}, | ||
{ | ||
// note: we can only lint code fences, _or_ the markdown files themselves | ||
// so for now we will just lint the code fences | ||
// https://github.com/eslint/markdown/blob/main/docs/processors/markdown.md#using-the-markdown-processor | ||
files: ['**/*.md'], | ||
processor: 'markdown/markdown', | ||
plugins: { | ||
markdown, | ||
}, | ||
language: 'markdown/gfm', | ||
}, | ||
]; |
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.