@ololoepepe/eslint-config 0.0.21 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.md +127 -1
- package/package.json +30 -10
- package/src/index.js +58 -297
- package/src/node.js +23 -0
- package/src/plugins/eslint-comments.js +12 -0
- package/src/plugins/import-x.js +107 -0
- package/src/plugins/n.js +43 -0
- package/src/plugins/promise.js +23 -0
- package/src/plugins/react-hooks.js +30 -0
- package/src/plugins/react.js +89 -0
- package/src/plugins/regexp.js +90 -0
- package/src/plugins/sort-keys-shorthand.js +7 -9
- package/src/plugins/stylistic.js +395 -0
- package/src/plugins/unicorn.js +321 -0
- package/src/react.js +48 -0
- package/src/rules/core.js +261 -0
- package/src/rules/jsx-stylistic.js +60 -0
- package/src/rules/no.js +237 -158
- package/src/plugins/import.js +0 -107
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
'import-x/consistent-type-specifier-style': 'off', // TODO: Reconsider if use TS/Flow
|
|
3
|
+
'import-x/default': 'error',
|
|
4
|
+
'import-x/dynamic-import-chunkname': ['error'],
|
|
5
|
+
'import-x/export': 'error',
|
|
6
|
+
'import-x/exports-last': 'off',
|
|
7
|
+
'import-x/extensions': 'off',
|
|
8
|
+
'import-x/first': ['error', 'absolute-first'],
|
|
9
|
+
'import-x/group-exports': 'off',
|
|
10
|
+
'import-x/max-dependencies': 'off',
|
|
11
|
+
'import-x/named': 'error',
|
|
12
|
+
'import-x/namespace': ['error', {
|
|
13
|
+
allowComputed: false
|
|
14
|
+
}],
|
|
15
|
+
'import-x/newline-after-import': ['error', {
|
|
16
|
+
considerComments: false,
|
|
17
|
+
count: 1
|
|
18
|
+
}],
|
|
19
|
+
'import-x/no-absolute-path': ['error', {
|
|
20
|
+
amd: true,
|
|
21
|
+
commonjs: true,
|
|
22
|
+
esmodule: true
|
|
23
|
+
}],
|
|
24
|
+
'import-x/no-amd': 'off',
|
|
25
|
+
'import-x/no-anonymous-default-export': 'off',
|
|
26
|
+
'import-x/no-commonjs': 'off',
|
|
27
|
+
'import-x/no-cycle': ['error', {
|
|
28
|
+
amd: true,
|
|
29
|
+
commonjs: true,
|
|
30
|
+
esmodule: true, // TODO
|
|
31
|
+
ignoreExternal: true
|
|
32
|
+
}],
|
|
33
|
+
'import-x/no-default-export': 'off',
|
|
34
|
+
'import-x/no-deprecated': 'warn',
|
|
35
|
+
'import-x/no-duplicates': ['error', {
|
|
36
|
+
considerQueryString: true
|
|
37
|
+
}],
|
|
38
|
+
'import-x/no-dynamic-require': 'off', // TODO
|
|
39
|
+
'import-x/no-empty-named-blocks': 'error',
|
|
40
|
+
'import-x/no-extraneous-dependencies': 'error',
|
|
41
|
+
'import-x/no-import-module-exports': 'off',
|
|
42
|
+
'import-x/no-internal-modules': 'off',
|
|
43
|
+
'import-x/no-mutable-exports': 'error',
|
|
44
|
+
'import-x/no-named-as-default': 'warn',
|
|
45
|
+
'import-x/no-named-as-default-member': 'error',
|
|
46
|
+
'import-x/no-named-default': 'off',
|
|
47
|
+
'import-x/no-named-export': 'off',
|
|
48
|
+
'import-x/no-namespace': 'off',
|
|
49
|
+
'import-x/no-nodejs-modules': 'off',
|
|
50
|
+
'import-x/no-relative-packages': 'off',
|
|
51
|
+
'import-x/no-relative-parent-imports': 'warn',
|
|
52
|
+
'import-x/no-rename-default': 'off',
|
|
53
|
+
'import-x/no-restricted-paths': 'off',
|
|
54
|
+
'import-x/no-self-import': 'error',
|
|
55
|
+
'import-x/no-unassigned-import': 'off',
|
|
56
|
+
'import-x/no-unresolved': ['error', {
|
|
57
|
+
ignore: ['^#']
|
|
58
|
+
}],
|
|
59
|
+
'import-x/no-unused-modules': 'off', // TODO: Reconsider
|
|
60
|
+
'import-x/no-useless-path-segments': ['error', {
|
|
61
|
+
commonjs: true,
|
|
62
|
+
noUselessIndex: false
|
|
63
|
+
}],
|
|
64
|
+
'import-x/no-webpack-loader-syntax': 'error',
|
|
65
|
+
'import-x/order': ['error', {
|
|
66
|
+
alphabetize: {
|
|
67
|
+
caseInsensitive: true,
|
|
68
|
+
order: 'asc',
|
|
69
|
+
orderImportKind: 'ignore'
|
|
70
|
+
},
|
|
71
|
+
distinctGroup: true,
|
|
72
|
+
groups: ['builtin', 'external', 'type', 'internal', 'parent', 'sibling', 'index', 'object', 'unknown'],
|
|
73
|
+
'newlines-between': 'always-and-inside-groups',
|
|
74
|
+
pathGroups: [{
|
|
75
|
+
group: 'internal',
|
|
76
|
+
pattern: '#src/**'
|
|
77
|
+
}, {
|
|
78
|
+
group: 'parent',
|
|
79
|
+
pattern: '../**/styles.js',
|
|
80
|
+
position: 'after'
|
|
81
|
+
}, {
|
|
82
|
+
group: 'parent',
|
|
83
|
+
pattern: '../**/styles.css',
|
|
84
|
+
position: 'after'
|
|
85
|
+
}, {
|
|
86
|
+
group: 'parent',
|
|
87
|
+
pattern: '../**/styles.less',
|
|
88
|
+
position: 'after'
|
|
89
|
+
}, {
|
|
90
|
+
group: 'sibling',
|
|
91
|
+
pattern: './**/styles.js',
|
|
92
|
+
position: 'after'
|
|
93
|
+
}, {
|
|
94
|
+
group: 'sibling',
|
|
95
|
+
pattern: './**/styles.css',
|
|
96
|
+
position: 'after'
|
|
97
|
+
}, {
|
|
98
|
+
group: 'sibling',
|
|
99
|
+
pattern: './**/styles.less',
|
|
100
|
+
position: 'after'
|
|
101
|
+
}],
|
|
102
|
+
warnOnUnassignedImports: false
|
|
103
|
+
}],
|
|
104
|
+
'import-x/prefer-default-export': 'off',
|
|
105
|
+
'import-x/prefer-namespace-import': 'off', // Configure in the frontend config via `patterns`
|
|
106
|
+
'import-x/unambiguous': 'off' // TODO: Reconsider
|
|
107
|
+
};
|
package/src/plugins/n.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
'n/callback-return': 'off',
|
|
3
|
+
'n/exports-style': 'off',
|
|
4
|
+
'n/file-extension-in-import': 'off',
|
|
5
|
+
'n/global-require': 'off',
|
|
6
|
+
'n/handle-callback-err': ['error', '^(err|error)$'],
|
|
7
|
+
'n/hashbang': 'error',
|
|
8
|
+
'n/no-callback-literal': 'error',
|
|
9
|
+
'n/no-deprecated-api': 'error',
|
|
10
|
+
'n/no-exports-assign': 'error',
|
|
11
|
+
'n/no-extraneous-import': 'off',
|
|
12
|
+
'n/no-extraneous-require': 'off',
|
|
13
|
+
'n/no-missing-import': 'off',
|
|
14
|
+
'n/no-missing-require': 'off',
|
|
15
|
+
'n/no-mixed-requires': 'off',
|
|
16
|
+
'n/no-new-require': 'error',
|
|
17
|
+
'n/no-path-concat': 'error',
|
|
18
|
+
'n/no-process-env': 'off',
|
|
19
|
+
'n/no-process-exit': 'warn',
|
|
20
|
+
'n/no-restricted-import': 'off',
|
|
21
|
+
'n/no-restricted-require': 'off',
|
|
22
|
+
'n/no-sync': 'off',
|
|
23
|
+
'n/no-top-level-await': 'off',
|
|
24
|
+
'n/no-unpublished-bin': 'error',
|
|
25
|
+
'n/no-unpublished-import': 'error',
|
|
26
|
+
'n/no-unpublished-require': 'error',
|
|
27
|
+
'n/no-unsupported-features/es-builtins': 'error',
|
|
28
|
+
'n/no-unsupported-features/es-syntax': 'error',
|
|
29
|
+
'n/no-unsupported-features/node-builtins': 'error',
|
|
30
|
+
'n/prefer-global/buffer': 'error',
|
|
31
|
+
'n/prefer-global/console': 'error',
|
|
32
|
+
'n/prefer-global/crypto': 'error',
|
|
33
|
+
'n/prefer-global/process': 'error',
|
|
34
|
+
'n/prefer-global/text-decoder': 'error',
|
|
35
|
+
'n/prefer-global/text-encoder': 'error',
|
|
36
|
+
'n/prefer-global/timers': 'error',
|
|
37
|
+
'n/prefer-global/url': 'error',
|
|
38
|
+
'n/prefer-global/url-search-params': 'error',
|
|
39
|
+
'n/prefer-node-protocol': 'error',
|
|
40
|
+
'n/prefer-promises/dns': 'error',
|
|
41
|
+
'n/prefer-promises/fs': 'error',
|
|
42
|
+
'n/process-exit-as-throw': 'error'
|
|
43
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
'promise/always-return': ['error', {
|
|
3
|
+
ignoreLastCallback: true
|
|
4
|
+
}],
|
|
5
|
+
'promise/avoid-new': 'off',
|
|
6
|
+
'promise/catch-or-return': 'error',
|
|
7
|
+
'promise/no-callback-in-promise': 'warn',
|
|
8
|
+
'promise/no-multiple-resolved': 'error',
|
|
9
|
+
'promise/no-native': 'off',
|
|
10
|
+
'promise/no-nesting': 'warn',
|
|
11
|
+
'promise/no-new-statics': 'error',
|
|
12
|
+
'promise/no-promise-in-callback': 'warn',
|
|
13
|
+
'promise/no-return-in-finally': 'error',
|
|
14
|
+
'promise/no-return-wrap': 'error',
|
|
15
|
+
'promise/param-names': 'error',
|
|
16
|
+
'promise/prefer-await-to-callbacks': 'off',
|
|
17
|
+
'promise/prefer-await-to-then': ['error', {
|
|
18
|
+
strict: true
|
|
19
|
+
}],
|
|
20
|
+
'promise/prefer-catch': 'error',
|
|
21
|
+
'promise/spec-only': 'error',
|
|
22
|
+
'promise/valid-params': 'error'
|
|
23
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
'react-hooks/capitalized-calls': 'off',
|
|
3
|
+
'react-hooks/config': 'error',
|
|
4
|
+
'react-hooks/error-boundaries': 'error',
|
|
5
|
+
'react-hooks/exhaustive-deps': 'warn',
|
|
6
|
+
'react-hooks/exhaustive-effect-dependencies': 'off',
|
|
7
|
+
'react-hooks/fbt': 'off',
|
|
8
|
+
'react-hooks/gating': 'error',
|
|
9
|
+
'react-hooks/globals': 'error',
|
|
10
|
+
'react-hooks/hooks': 'off',
|
|
11
|
+
'react-hooks/immutability': 'error',
|
|
12
|
+
'react-hooks/incompatible-library': 'warn',
|
|
13
|
+
'react-hooks/invariant': 'off',
|
|
14
|
+
'react-hooks/memo-dependencies': 'off',
|
|
15
|
+
'react-hooks/memoized-effect-dependencies': 'off',
|
|
16
|
+
'react-hooks/no-deriving-state-in-effects': 'off',
|
|
17
|
+
'react-hooks/preserve-manual-memoization': 'error',
|
|
18
|
+
'react-hooks/purity': 'error',
|
|
19
|
+
'react-hooks/refs': 'off',
|
|
20
|
+
'react-hooks/rule-suppression': 'off',
|
|
21
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
22
|
+
'react-hooks/set-state-in-effect': 'error',
|
|
23
|
+
'react-hooks/set-state-in-render': 'error',
|
|
24
|
+
'react-hooks/static-components': 'error',
|
|
25
|
+
'react-hooks/syntax': 'off',
|
|
26
|
+
'react-hooks/todo': 'off',
|
|
27
|
+
'react-hooks/unsupported-syntax': 'warn',
|
|
28
|
+
'react-hooks/use-memo': 'error',
|
|
29
|
+
'react-hooks/void-use-memo': 'error'
|
|
30
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml': 'error',
|
|
3
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml-with-children': 'error',
|
|
4
|
+
'@eslint-react/dom-no-find-dom-node': 'error',
|
|
5
|
+
'@eslint-react/dom-no-flush-sync': 'error',
|
|
6
|
+
'@eslint-react/dom-no-hydrate': 'error',
|
|
7
|
+
'@eslint-react/dom-no-missing-button-type': 'error',
|
|
8
|
+
'@eslint-react/dom-no-missing-iframe-sandbox': 'error',
|
|
9
|
+
'@eslint-react/dom-no-render': 'error',
|
|
10
|
+
'@eslint-react/dom-no-render-return-value': 'error',
|
|
11
|
+
'@eslint-react/dom-no-script-url': 'error',
|
|
12
|
+
'@eslint-react/dom-no-string-style-prop': 'error',
|
|
13
|
+
'@eslint-react/dom-no-unknown-property': 'error',
|
|
14
|
+
'@eslint-react/dom-no-unsafe-iframe-sandbox': 'error',
|
|
15
|
+
'@eslint-react/dom-no-unsafe-target-blank': 'error',
|
|
16
|
+
'@eslint-react/dom-no-use-form-state': 'error',
|
|
17
|
+
'@eslint-react/dom-no-void-elements-with-children': 'error',
|
|
18
|
+
'@eslint-react/error-boundaries': 'off',
|
|
19
|
+
'@eslint-react/exhaustive-deps': 'off',
|
|
20
|
+
'@eslint-react/globals': 'off',
|
|
21
|
+
'@eslint-react/immutability': 'off',
|
|
22
|
+
'@eslint-react/jsx-no-children-prop': 'error',
|
|
23
|
+
'@eslint-react/jsx-no-children-prop-with-children': 'error',
|
|
24
|
+
'@eslint-react/jsx-no-comment-textnodes': 'error',
|
|
25
|
+
'@eslint-react/jsx-no-key-after-spread': 'error',
|
|
26
|
+
'@eslint-react/jsx-no-leaked-dollar': 'warn',
|
|
27
|
+
'@eslint-react/jsx-no-leaked-semicolon': 'off',
|
|
28
|
+
'@eslint-react/jsx-no-namespace': 'error',
|
|
29
|
+
'@eslint-react/jsx-no-useless-fragment': 'error',
|
|
30
|
+
'@eslint-react/naming-convention-context-name': 'error',
|
|
31
|
+
'@eslint-react/naming-convention-id-name': 'error',
|
|
32
|
+
'@eslint-react/naming-convention-ref-name': 'error',
|
|
33
|
+
'@eslint-react/no-access-state-in-setstate': 'error',
|
|
34
|
+
'@eslint-react/no-array-index-key': 'error',
|
|
35
|
+
'@eslint-react/no-children-count': 'error',
|
|
36
|
+
'@eslint-react/no-children-for-each': 'error',
|
|
37
|
+
'@eslint-react/no-children-map': 'error',
|
|
38
|
+
'@eslint-react/no-children-only': 'error',
|
|
39
|
+
'@eslint-react/no-children-to-array': 'error',
|
|
40
|
+
'@eslint-react/no-class-component': 'error',
|
|
41
|
+
'@eslint-react/no-clone-element': 'error',
|
|
42
|
+
'@eslint-react/no-component-will-mount': 'error',
|
|
43
|
+
'@eslint-react/no-component-will-receive-props': 'error',
|
|
44
|
+
'@eslint-react/no-component-will-update': 'error',
|
|
45
|
+
'@eslint-react/no-context-provider': 'error',
|
|
46
|
+
'@eslint-react/no-create-ref': 'error',
|
|
47
|
+
'@eslint-react/no-direct-mutation-state': 'error',
|
|
48
|
+
'@eslint-react/no-duplicate-key': 'error',
|
|
49
|
+
'@eslint-react/no-forward-ref': 'error',
|
|
50
|
+
'@eslint-react/no-implicit-children': 'off',
|
|
51
|
+
'@eslint-react/no-implicit-key': 'off',
|
|
52
|
+
'@eslint-react/no-implicit-ref': 'off',
|
|
53
|
+
'@eslint-react/no-leaked-conditional-rendering': 'off',
|
|
54
|
+
'@eslint-react/no-missing-component-display-name': 'off',
|
|
55
|
+
'@eslint-react/no-missing-context-display-name': 'off',
|
|
56
|
+
'@eslint-react/no-missing-key': 'error',
|
|
57
|
+
'@eslint-react/no-misused-capture-owner-stack': 'error',
|
|
58
|
+
'@eslint-react/no-nested-component-definitions': 'error',
|
|
59
|
+
'@eslint-react/no-nested-lazy-component-declarations': 'error',
|
|
60
|
+
'@eslint-react/no-set-state-in-component-did-mount': 'error',
|
|
61
|
+
'@eslint-react/no-set-state-in-component-did-update': 'error',
|
|
62
|
+
'@eslint-react/no-set-state-in-component-will-update': 'error',
|
|
63
|
+
'@eslint-react/no-unnecessary-use-prefix': 'error',
|
|
64
|
+
'@eslint-react/no-unsafe-component-will-mount': 'warn',
|
|
65
|
+
'@eslint-react/no-unsafe-component-will-receive-props': 'warn',
|
|
66
|
+
'@eslint-react/no-unsafe-component-will-update': 'warn',
|
|
67
|
+
'@eslint-react/no-unstable-context-value': 'error',
|
|
68
|
+
'@eslint-react/no-unstable-default-props': 'error',
|
|
69
|
+
'@eslint-react/no-unused-class-component-members': 'error',
|
|
70
|
+
'@eslint-react/no-unused-props': 'off',
|
|
71
|
+
'@eslint-react/no-unused-state': 'error',
|
|
72
|
+
'@eslint-react/no-use-context': 'warn',
|
|
73
|
+
'@eslint-react/purity': 'off',
|
|
74
|
+
'@eslint-react/refs': 'off',
|
|
75
|
+
'@eslint-react/rsc-function-definition': 'error',
|
|
76
|
+
'@eslint-react/rules-of-hooks': 'off',
|
|
77
|
+
'@eslint-react/set-state-in-effect': 'off',
|
|
78
|
+
'@eslint-react/set-state-in-render': 'off',
|
|
79
|
+
'@eslint-react/static-components': 'off',
|
|
80
|
+
'@eslint-react/unsupported-syntax': 'off',
|
|
81
|
+
'@eslint-react/use-memo': 'off',
|
|
82
|
+
'@eslint-react/use-state': 'error',
|
|
83
|
+
'@eslint-react/web-api-no-leaked-event-listener': 'warn',
|
|
84
|
+
'@eslint-react/web-api-no-leaked-fetch': 'warn',
|
|
85
|
+
'@eslint-react/web-api-no-leaked-intersection-observer': 'warn',
|
|
86
|
+
'@eslint-react/web-api-no-leaked-interval': 'warn',
|
|
87
|
+
'@eslint-react/web-api-no-leaked-resize-observer': 'warn',
|
|
88
|
+
'@eslint-react/web-api-no-leaked-timeout': 'warn'
|
|
89
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
'regexp/confusing-quantifier': 'warn',
|
|
3
|
+
'regexp/control-character-escape': 'error',
|
|
4
|
+
'regexp/grapheme-string-literal': 'off',
|
|
5
|
+
'regexp/hexadecimal-escape': [
|
|
6
|
+
'error',
|
|
7
|
+
'never'
|
|
8
|
+
],
|
|
9
|
+
'regexp/letter-case': 'error',
|
|
10
|
+
'regexp/match-any': 'error',
|
|
11
|
+
'regexp/negation': 'error',
|
|
12
|
+
'regexp/no-contradiction-with-assertion': 'error',
|
|
13
|
+
'regexp/no-control-character': 'error',
|
|
14
|
+
'regexp/no-dupe-characters-character-class': 'error',
|
|
15
|
+
'regexp/no-dupe-disjunctions': 'error',
|
|
16
|
+
'regexp/no-empty-alternative': 'error',
|
|
17
|
+
'regexp/no-empty-capturing-group': 'error',
|
|
18
|
+
'regexp/no-empty-character-class': 'error',
|
|
19
|
+
'regexp/no-empty-group': 'error',
|
|
20
|
+
'regexp/no-empty-lookarounds-assertion': 'error',
|
|
21
|
+
'regexp/no-empty-string-literal': 'error',
|
|
22
|
+
'regexp/no-escape-backspace': 'error',
|
|
23
|
+
'regexp/no-extra-lookaround-assertions': 'error',
|
|
24
|
+
'regexp/no-invalid-regexp': 'error',
|
|
25
|
+
'regexp/no-invisible-character': 'error',
|
|
26
|
+
'regexp/no-lazy-ends': 'warn',
|
|
27
|
+
'regexp/no-legacy-features': 'error',
|
|
28
|
+
'regexp/no-misleading-capturing-group': 'error',
|
|
29
|
+
'regexp/no-misleading-unicode-character': 'error',
|
|
30
|
+
'regexp/no-missing-g-flag': 'error',
|
|
31
|
+
'regexp/no-non-standard-flag': 'error',
|
|
32
|
+
'regexp/no-obscure-range': 'error',
|
|
33
|
+
'regexp/no-octal': 'error',
|
|
34
|
+
'regexp/no-optional-assertion': 'error',
|
|
35
|
+
'regexp/no-potentially-useless-backreference': 'warn',
|
|
36
|
+
'regexp/no-standalone-backslash': 'error',
|
|
37
|
+
'regexp/no-super-linear-backtracking': 'error',
|
|
38
|
+
'regexp/no-super-linear-move': 'error',
|
|
39
|
+
'regexp/no-trivially-nested-assertion': 'error',
|
|
40
|
+
'regexp/no-trivially-nested-quantifier': 'error',
|
|
41
|
+
'regexp/no-unused-capturing-group': 'error',
|
|
42
|
+
'regexp/no-useless-assertions': 'error',
|
|
43
|
+
'regexp/no-useless-backreference': 'error',
|
|
44
|
+
'regexp/no-useless-character-class': 'error',
|
|
45
|
+
'regexp/no-useless-dollar-replacements': 'error',
|
|
46
|
+
'regexp/no-useless-escape': 'off',
|
|
47
|
+
'regexp/no-useless-flag': 'error',
|
|
48
|
+
'regexp/no-useless-lazy': 'error',
|
|
49
|
+
'regexp/no-useless-non-capturing-group': 'error',
|
|
50
|
+
'regexp/no-useless-quantifier': 'error',
|
|
51
|
+
'regexp/no-useless-range': 'error',
|
|
52
|
+
'regexp/no-useless-set-operand': 'error',
|
|
53
|
+
'regexp/no-useless-string-literal': 'error',
|
|
54
|
+
'regexp/no-useless-two-nums-quantifier': 'error',
|
|
55
|
+
'regexp/no-zero-quantifier': 'error',
|
|
56
|
+
'regexp/optimal-lookaround-quantifier': 'warn',
|
|
57
|
+
'regexp/optimal-quantifier-concatenation': 'error',
|
|
58
|
+
'regexp/prefer-character-class': 'error',
|
|
59
|
+
'regexp/prefer-d': 'error',
|
|
60
|
+
'regexp/prefer-escape-replacement-dollar-char': 'error',
|
|
61
|
+
'regexp/prefer-lookaround': 'warn',
|
|
62
|
+
'regexp/prefer-named-backreference': 'error',
|
|
63
|
+
'regexp/prefer-named-capture-group': 'warn',
|
|
64
|
+
'regexp/prefer-named-replacement': 'error',
|
|
65
|
+
'regexp/prefer-plus-quantifier': 'error',
|
|
66
|
+
'regexp/prefer-predefined-assertion': 'error',
|
|
67
|
+
'regexp/prefer-quantifier': 'error',
|
|
68
|
+
'regexp/prefer-question-quantifier': 'error',
|
|
69
|
+
'regexp/prefer-range': 'error',
|
|
70
|
+
'regexp/prefer-regexp-exec': 'error',
|
|
71
|
+
'regexp/prefer-regexp-test': 'error',
|
|
72
|
+
'regexp/prefer-result-array-groups': 'error',
|
|
73
|
+
'regexp/prefer-set-operation': 'error',
|
|
74
|
+
'regexp/prefer-star-quantifier': 'error',
|
|
75
|
+
'regexp/prefer-unicode-codepoint-escapes': 'error',
|
|
76
|
+
'regexp/prefer-w': 'error',
|
|
77
|
+
'regexp/require-unicode-regexp': 'error',
|
|
78
|
+
'regexp/require-unicode-sets-regexp': 'off',
|
|
79
|
+
'regexp/simplify-set-operations': 'error',
|
|
80
|
+
'regexp/sort-alternatives': 'error',
|
|
81
|
+
'regexp/sort-character-class-elements': 'error',
|
|
82
|
+
'regexp/sort-flags': 'error',
|
|
83
|
+
'regexp/strict': 'error',
|
|
84
|
+
'regexp/unicode-escape': [
|
|
85
|
+
'error',
|
|
86
|
+
'unicodeCodePointEscape'
|
|
87
|
+
],
|
|
88
|
+
'regexp/unicode-property': 'error',
|
|
89
|
+
'regexp/use-ignore-case': 'error'
|
|
90
|
+
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}]
|
|
9
|
-
}
|
|
1
|
+
export const rules = {
|
|
2
|
+
'sort-keys-shorthand/sort-keys-shorthand': ['error', 'asc', {
|
|
3
|
+
caseSensitive: false,
|
|
4
|
+
minKeys: 2,
|
|
5
|
+
natural: true,
|
|
6
|
+
shorthand: 'first'
|
|
7
|
+
}]
|
|
10
8
|
};
|