This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
40 lines (40 loc) · 1.53 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module.exports = {
extends: 'react-app',
plugins: ['react-hooks'],
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'no-restricted-properties': [
2,
{
property: 'defaultProps',
message:
'Specifying static properties such as defaultProps can break tree shaking. Use default parameter values instead. See http://es6-features.org/#DefaultParameterValues.',
},
],
// Forbid the use of extraneous packages
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
'import/no-extraneous-dependencies': [
'off',
{
devDependencies: [
'rollup.config.js',
'jest.*.js',
'**/*{.,_}{stories,story}.{js,jsx,ts,tsx}',
'test/**', // tape, common npm pattern
'tests/**', // also common npm pattern
'spec/**', // mocha, rspec-like pattern
'**/__tests__/**', // jest pattern
'**/__mocks__/**', // jest pattern
'test.{js,jsx,ts,tsx}', // repos with a single test file
'test-*.{js,jsx,ts,tsx}', // repos with multiple top-level test files
'**/*{.,_}{test,spec}.{js,jsx,ts,tsx}', // tests where the extension or filename suffix denotes that it is a test
'**/jest.config.js', // jest config
'**/postcss.config.js', // postcss config
'**/webpack.config.js', // webpack config
'**/webpack.config.*.js', // webpack config
],
},
],
},
};