This repository was archived by the owner on Sep 13, 2024. It is now read-only.
forked from makerdao-ses/ecosystem-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
84 lines (84 loc) · 2.25 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* eslint-disable spellcheck/spell-checker */
/* eslint-disable @typescript-eslint/no-var-requires */
const dictionary = require('./src/core/utils/dictionary');
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['standard', 'plugin:@typescript-eslint/recommended', 'plugin:storybook/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'spellcheck', 'react-hooks'],
rules: {
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx', '.js', '.ts'] }],
'max-lines': [
'error',
{
max: 1000,
skipBlankLines: true,
skipComments: true,
},
],
semi: 0,
indent: 0,
'multiline-ternary': 0,
'space-before-function-paren': 0,
'comma-dangle': 0,
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: false }],
'spellcheck/spell-checker': [
1,
{
comments: true,
strings: true,
identifiers: true,
templates: true,
lang: 'en_US',
skipWords: dictionary,
skipIfMatch: ['http://[^s]*', '^[-\\w]+/[-\\w\\.]+$', '^(?=.*[a-zA-Z])(?=.*[0-9])'],
skipWordIfMatch: ['^foobar.*$'],
minLength: 4,
},
],
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'storybook/story-exports': 0,
'arrow-body-style': ['error', 'as-needed'],
'react/self-closing-comp': [
'error',
{
component: true,
html: true,
},
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
},
],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'parent', 'sibling', 'index', 'object', 'type'],
pathGroups: [
{
pattern: '@/**/**',
group: 'parent',
position: 'before',
},
],
alphabetize: { order: 'asc' },
},
],
},
ignorePatterns: ['!.storybook'],
};