-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed the smart-quote plugin as it was incompatible with the new version of eslint and looked outdated.
- Loading branch information
1 parent
22bce73
commit 36ba4b4
Showing
6 changed files
with
193 additions
and
171 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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,110 @@ | ||
import js from '@eslint/js'; | ||
import babelParser from '@babel/eslint-parser'; | ||
import reactPlugin from 'eslint-plugin-react'; | ||
import prettierPlugin from 'eslint-plugin-prettier'; | ||
import storybookPlugin from 'eslint-plugin-storybook'; | ||
import typeScriptEsLint from '@typescript-eslint/eslint-plugin'; | ||
import globals from 'globals'; | ||
|
||
const pharosConfig = { | ||
ignores: [ | ||
'node_modules/', | ||
'dist/', | ||
'lib/', | ||
'.storybook-static/', | ||
'packages/pharos/coverage/**/*.js', | ||
'packages/pharos/src/styles/**/*.ts', | ||
'packages/pharos-site/public/', | ||
'packages/pharos-site/.cache/', | ||
'**/*.css.ts', | ||
], | ||
languageOptions: { | ||
parser: babelParser, | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
requireConfigFile: false, | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
babelOptions: { | ||
plugins: ['@babel/plugin-syntax-import-assertions'], | ||
presets: ['@babel/preset-react'], | ||
}, | ||
}, | ||
}, | ||
plugins: { | ||
reactPlugin, | ||
prettierPlugin, | ||
storybookPlugin, | ||
typeScriptEsLint, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
}, | ||
}; | ||
|
||
const tsConfig = { | ||
files: ['*.ts'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './packages/**/tsconfig.json', | ||
}, | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:wc/recommended', | ||
'plugin:lit/recommended', | ||
], | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/consistent-type-imports': ['error'], | ||
'@typescript-eslint/no-unused-vars': ['error'], | ||
'lit/no-legacy-template-syntax': 'off', | ||
}, | ||
}; | ||
|
||
const tsxConfig = { | ||
files: ['*.tsx'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './packages/**/tsconfig.json', | ||
}, | ||
extends: [ | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/consistent-type-imports': ['error'], | ||
'@typescript-eslint/no-unused-vars': ['error'], | ||
'react/display-name': 'off', | ||
'react/prop-types': 'off', | ||
'react/jsx-uses-react': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
}, | ||
}; | ||
|
||
const mdxConfig = { | ||
files: ['*.mdx'], | ||
extends: ['plugin:mdx/recommended', 'plugin:react/recommended'], | ||
settings: { | ||
'mdx/code-blocks': true, | ||
}, | ||
rules: { | ||
'react/no-unescaped-entities': 'off', | ||
'react/jsx-no-undef': 'off', | ||
}, | ||
}; | ||
|
||
export default [js.configs.recommended, pharosConfig, tsConfig, tsxConfig, mdxConfig]; |
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.