-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
66 lines (66 loc) · 2.07 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
module.exports = {
root: true,
overrides: [
// Add linting (and Prettier formatting) for TypeScript files
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['react', '@typescript-eslint'],
extends: [
'plugin:react/recommended',
'airbnb-typescript',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'react/prop-types': 0,
'react/jsx-props-no-spreading': 0,
'react/jsx-one-expression-per-line': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/indent': 0,
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/comma-dangle': 0,
'object-shorthand': 0,
'prefer-destructuring': 0,
'import/prefer-default-export': 0,
'global-require': 0,
'no-console': 'off',
},
overrides: [
{
// Allow importing dev dependencies in stories, tests and the generated theme
files: [
'**/theme/**/*.{ts,tsx}',
'**/*.test.{ts,tsx}',
'**/src/utils/testing/**/*.{ts,tsx}',
'**/*.stories.tsx',
],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
},
{
// Add basic linting (and Prettier formatting) for the few necessary JS files (i.e. `next.config.js`, `jest.config.js`, etc.)
files: ['**/*.js'],
extends: ['airbnb-base', 'plugin:prettier/recommended'],
overrides: [
{
// Allow importing dev dependencies in the generated theme
files: ['tailwind.figma2theme.js'],
rules: { 'import/no-extraneous-dependencies': 'off' },
},
],
},
],
};