-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
66 lines (64 loc) · 1.6 KB
/
Copy patheslint.config.js
File metadata and controls
66 lines (64 loc) · 1.6 KB
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
// Run `npx @eslint/config-inspector` to inspect the config.
import globals from 'globals';
import js from '@eslint/js';
import importPlugin from 'eslint-plugin-import';
import jsdoc from 'eslint-plugin-jsdoc';
import eslintConfigPrettier from 'eslint-config-prettier';
export default [
{
ignores: ['.yarn/'],
},
js.configs.recommended,
importPlugin.flatConfigs.recommended,
jsdoc.configs['flat/recommended'],
eslintConfigPrettier,
{
languageOptions: {
ecmaVersion: 2023,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.node,
...globals.jest,
},
},
settings: {
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.ts', '.d.ts', '.tsx'],
},
typescript: {
// This project doesn't use typescript but the typescript
// resolver solves an issue with package.json `exports`
// See https://github.com/cfpb/design-system/pull/2133
},
},
react: {
version: 'detect',
},
},
// Some plugins are automatically included.
// plugins: {},
rules: {
'jsdoc/require-hyphen-before-param-description': 'warn',
'no-console': ['warn'],
'no-use-before-define': ['error', 'nofunc'],
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
},
],
'no-var': ['error'],
'prefer-const': ['error'],
radix: ['error'],
},
},
];