@frontify/eslint-config-basic 0.13.2 → 0.15.2
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/index.js +132 -5
- package/package.json +11 -8
package/index.js
CHANGED
|
@@ -4,10 +4,89 @@ module.exports = {
|
|
|
4
4
|
browser: true,
|
|
5
5
|
node: true,
|
|
6
6
|
},
|
|
7
|
+
plugins: ["html", "unicorn", "prettier"],
|
|
8
|
+
extends: [
|
|
9
|
+
"plugin:jsonc/recommended-with-jsonc",
|
|
10
|
+
"plugin:prettier/recommended",
|
|
11
|
+
],
|
|
12
|
+
overrides: [
|
|
13
|
+
{
|
|
14
|
+
files: ["*.json", "*.json5"],
|
|
15
|
+
parser: "jsonc-eslint-parser",
|
|
16
|
+
rules: {
|
|
17
|
+
quotes: ["error", "double"],
|
|
18
|
+
"quote-props": ["error", "always"],
|
|
19
|
+
"comma-dangle": ["error", "never"],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
files: ["*.yaml", "*.yml"],
|
|
24
|
+
parser: "yaml-eslint-parser",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
files: ["package.json"],
|
|
28
|
+
parser: "jsonc-eslint-parser",
|
|
29
|
+
rules: {
|
|
30
|
+
"jsonc/sort-keys": [
|
|
31
|
+
"error",
|
|
32
|
+
{
|
|
33
|
+
pathPattern: "^$",
|
|
34
|
+
order: [
|
|
35
|
+
"name",
|
|
36
|
+
"version",
|
|
37
|
+
"description",
|
|
38
|
+
"keywords",
|
|
39
|
+
"license",
|
|
40
|
+
"repository",
|
|
41
|
+
"funding",
|
|
42
|
+
"author",
|
|
43
|
+
"type",
|
|
44
|
+
"files",
|
|
45
|
+
"exports",
|
|
46
|
+
"main",
|
|
47
|
+
"module",
|
|
48
|
+
"unpkg",
|
|
49
|
+
"bin",
|
|
50
|
+
"scripts",
|
|
51
|
+
"husky",
|
|
52
|
+
"lint-staged",
|
|
53
|
+
"peerDependencies",
|
|
54
|
+
"peerDependenciesMeta",
|
|
55
|
+
"dependencies",
|
|
56
|
+
"devDependencies",
|
|
57
|
+
"eslintConfig",
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$",
|
|
62
|
+
order: { type: "asc" },
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
files: ["*.js"],
|
|
69
|
+
rules: {
|
|
70
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
files: ["scripts/**/*.*"],
|
|
75
|
+
rules: {
|
|
76
|
+
"no-console": "off",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
files: ["*.test.ts", "*.test.js", "*.spec.ts", "*.spec.js"],
|
|
81
|
+
rules: {
|
|
82
|
+
"no-unused-expressions": "off",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
],
|
|
7
86
|
rules: {
|
|
8
87
|
"linebreak-style": ["error", "unix"],
|
|
9
|
-
"prettier/prettier": "error",
|
|
10
88
|
"prefer-template": "error",
|
|
89
|
+
"template-curly-spacing": "error",
|
|
11
90
|
"no-useless-concat": "error",
|
|
12
91
|
"prefer-arrow-callback": "error",
|
|
13
92
|
"no-var": "error",
|
|
@@ -15,9 +94,57 @@ module.exports = {
|
|
|
15
94
|
eqeqeq: "error",
|
|
16
95
|
"no-eval": "error",
|
|
17
96
|
"no-extra-bind": "error",
|
|
18
|
-
curly: "error",
|
|
19
|
-
|
|
97
|
+
curly: ["error", "all"],
|
|
98
|
+
semi: ["error", "always"],
|
|
99
|
+
quotes: ["error", "single", { avoidEscape: true }],
|
|
100
|
+
"vars-on-top": "error",
|
|
101
|
+
"block-scoped-var": "error",
|
|
102
|
+
"array-callback-return": "error",
|
|
103
|
+
"object-shorthand": [
|
|
104
|
+
"error",
|
|
105
|
+
"always",
|
|
106
|
+
{
|
|
107
|
+
ignoreConstructors: false,
|
|
108
|
+
avoidQuotes: true,
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
|
|
112
|
+
"unicorn/error-message": "error",
|
|
113
|
+
"unicorn/escape-case": "error",
|
|
114
|
+
"unicorn/no-array-instanceof": "error",
|
|
115
|
+
"unicorn/no-new-buffer": "error",
|
|
116
|
+
"unicorn/no-unsafe-regex": "off",
|
|
117
|
+
"unicorn/number-literal-case": "error",
|
|
118
|
+
"unicorn/prefer-exponentiation-operator": "error",
|
|
119
|
+
"unicorn/prefer-includes": "error",
|
|
120
|
+
"unicorn/prefer-starts-ends-with": "error",
|
|
121
|
+
"unicorn/prefer-text-content": "error",
|
|
122
|
+
"unicorn/prefer-type-error": "error",
|
|
123
|
+
"unicorn/throw-new-error": "error",
|
|
124
|
+
"unicorn/prefer-string-replace-all": "error",
|
|
125
|
+
"unicorn/prefer-default-parameters": "error",
|
|
126
|
+
"unicorn/prefer-array-find": "error",
|
|
127
|
+
"unicorn/no-array-for-each": "error",
|
|
128
|
+
"unicorn/error-message": "error",
|
|
129
|
+
"unicorn/custom-error-definition": "error",
|
|
130
|
+
"unicorn/better-regex": "error",
|
|
131
|
+
"unicorn/explicit-length-check": "error",
|
|
132
|
+
"unicorn/no-await-expression-member": "error",
|
|
133
|
+
"unicorn/no-nested-ternary": "error",
|
|
134
|
+
"unicorn/no-new-array": "error",
|
|
135
|
+
"unicorn/no-this-assignment": "error",
|
|
136
|
+
"unicorn/no-unsafe-regex": "error",
|
|
137
|
+
"unicorn/no-useless-length-check": "error",
|
|
138
|
+
|
|
139
|
+
"sort-imports": [
|
|
140
|
+
"error",
|
|
141
|
+
{
|
|
142
|
+
ignoreCase: false,
|
|
143
|
+
ignoreDeclarationSort: true,
|
|
144
|
+
ignoreMemberSort: false,
|
|
145
|
+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
|
|
146
|
+
allowSeparatedGroups: false,
|
|
147
|
+
},
|
|
148
|
+
],
|
|
20
149
|
},
|
|
21
|
-
plugins: ["html", "prettier", "import"],
|
|
22
|
-
extends: ["plugin:prettier/recommended"],
|
|
23
150
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontify/eslint-config-basic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Frontify Developers <developers@frontify.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/Frontify/eslint-config",
|
|
10
|
+
"directory": "packages/basic"
|
|
11
|
+
},
|
|
7
12
|
"scripts": {
|
|
8
13
|
"lint": "eslint . --config=index.js"
|
|
9
14
|
},
|
|
@@ -14,18 +19,16 @@
|
|
|
14
19
|
"access": "public"
|
|
15
20
|
},
|
|
16
21
|
"peerDependencies": {
|
|
17
|
-
"eslint": ">=8.
|
|
22
|
+
"eslint": ">=8.5.0"
|
|
18
23
|
},
|
|
19
24
|
"dependencies": {
|
|
20
25
|
"eslint-config-prettier": "^8.3.0",
|
|
21
26
|
"eslint-plugin-html": "^6.2.0",
|
|
22
|
-
"eslint-plugin-
|
|
27
|
+
"eslint-plugin-jsonc": "^2.1.0",
|
|
23
28
|
"eslint-plugin-node": "^11.1.0",
|
|
24
29
|
"eslint-plugin-prettier": "^4.0.0",
|
|
25
|
-
"eslint-plugin-promise": "^
|
|
26
|
-
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"eslint": "8.3.0"
|
|
30
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
31
|
+
"eslint-plugin-unicorn": "^40.1.0"
|
|
29
32
|
},
|
|
30
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "c270504937b67f1a34dcf3616341f2c0868aa2e5"
|
|
31
34
|
}
|