-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
94 lines (91 loc) · 2.92 KB
/
.eslintrc.json
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
85
86
87
88
89
90
91
92
93
94
{
"root": true,
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": [
"plugin:@cspell/recommended",
// Enables eslint-plugin-prettier and eslint-config-prettier.
// This will display Prettier errors as ESLint errors.
// This should always be the last configuration in the extends array.
"plugin:prettier/recommended"
],
"overrides": [
/*
* Javascript files.
*/
{
"files": ["*.js"],
"extends": [
"standard",
// Enables eslint-plugin-prettier and eslint-config-prettier.
// This will display Prettier errors as ESLint errors.
// This should always be the last configuration in the extends array.
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": "latest"
}
},
/*
* JSON files.
*/
{
"files": ["*.json"],
"extends": [
"plugin:json/recommended-with-comments",
// Enables eslint-plugin-prettier and eslint-config-prettier.
// This will display Prettier errors as ESLint errors.
// This should always be the last configuration in the extends array.
"plugin:prettier/recommended"
]
},
/*
* `package.json` file.
* This needs it's own configuration, because it doesn't work together with `plugin:json`.
* See https://github.com/kellyselden/eslint-plugin-json-files/issues/40
* Must be after `*.json`.
*/
{
"files": ["package.json"],
"plugins": ["json-files"],
"extends": [
// Enables eslint-plugin-prettier and eslint-config-prettier.
// This will display Prettier errors as ESLint errors.
// This should always be the last configuration in the extends array.
"plugin:prettier/recommended"
],
"rules": {
"json-files/ensure-repository-directory": "error",
"json-files/no-branch-in-dependencies": "error",
"json-files/require-engines": "error",
"json-files/require-license": "error",
"json-files/require-unique-dependency-names": "error",
"json-files/sort-package-json": "error"
}
},
/*
* Markdown files.
*/
{
"files": ["*.md"],
"parser": "eslint-plugin-markdownlint/parser",
"extends": [
"plugin:markdownlint/recommended",
// Enables eslint-plugin-prettier and eslint-config-prettier.
// This will display Prettier errors as ESLint errors.
// This should always be the last configuration in the extends array.
"plugin:prettier/recommended"
// Enable once supported for Markdown files.
// See https://github.com/streetsidesoftware/cspell/issues/3464
//"plugin:@cspell/recommended"
],
"rules": {
"markdownlint/md033": ["error", { "allowed_elements": ["br"] }], // Allow br-element.
"prettier/prettier": ["error", { "parser": "markdown" }]
}
}
]
}