-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add eslint to Docusaurus and play together with turborepo's linting
- Loading branch information
1 parent
aca9f75
commit 27fba62
Showing
3 changed files
with
78 additions
and
36 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module.exports = { | ||
extends: 'eslint-config-telescope', | ||
|
||
overrides: [ | ||
{ | ||
files: ['./**/*.js'], | ||
extends: [ | ||
'plugin:import/typescript', | ||
'plugin:node/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
plugins: ['react', 'react-hooks'], | ||
rules: { | ||
// https://github.com/facebook/docusaurus/blob/main/.eslintrc.js#L122 | ||
// Ignore certain webpack aliases because they can't be resolved | ||
'import/no-unresolved': [ | ||
'off', | ||
{ | ||
ignore: ['^@theme', '^@docusaurus', '^@generated', '^@site'], | ||
}, | ||
], | ||
'global-require': 'off', | ||
'no-use-before-define': 'off', | ||
'node/no-missing-import': 'off', | ||
'node/no-unsupported-features/es-syntax': 'off', | ||
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }], | ||
// https://github.com/facebook/docusaurus/blob/main/.eslintrc.js#L154 | ||
// We build a static site, and nearly all components don't change. | ||
'react/no-array-index-key': 'off', | ||
'react/prop-types': 'off', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', 'tsx'], | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}; |
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