@momsfriendlydevco/eslint-config 2.3.0 → 2.4.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/eslint.config.js +11 -18
- package/index.js +13 -48
- package/package.json +7 -6
package/eslint.config.js
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
|
+
import {defineConfig, globalIgnores} from "eslint/config";
|
|
1
2
|
import RulesMFDC from '@momsfriendlydevco/eslint-config';
|
|
2
3
|
|
|
3
|
-
export default [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// Generic globals
|
|
14
|
-
languageOptions: {
|
|
15
|
-
globals: {
|
|
16
|
-
// Put custom globals here
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
4
|
+
export default defineConfig([
|
|
5
|
+
globalIgnores([
|
|
6
|
+
'.*',
|
|
7
|
+
'docs/',
|
|
8
|
+
'dist/',
|
|
9
|
+
'node_modules/',
|
|
10
|
+
'public/',
|
|
11
|
+
'**/.wrangler/',
|
|
12
|
+
]),
|
|
20
13
|
...RulesMFDC,
|
|
21
|
-
]
|
|
14
|
+
])
|
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import eslintParser from 'vue-eslint-parser';
|
|
2
|
+
import globals from 'globals';
|
|
2
3
|
import pluginEslintJS from '@eslint/js';
|
|
3
4
|
import pluginJSDoc from 'eslint-plugin-jsdoc';
|
|
4
5
|
import pluginUnicorn from 'eslint-plugin-unicorn';
|
|
@@ -35,30 +36,7 @@ export default [
|
|
|
35
36
|
{
|
|
36
37
|
languageOptions: {
|
|
37
38
|
globals: {
|
|
38
|
-
|
|
39
|
-
atob: 'readable',
|
|
40
|
-
btoa: 'readable',
|
|
41
|
-
clearInterval: 'readonly',
|
|
42
|
-
clearTimeout: 'readonly',
|
|
43
|
-
console: 'readonly',
|
|
44
|
-
fetch: 'readonly',
|
|
45
|
-
setInterval: 'readonly',
|
|
46
|
-
setTimeout: 'readonly',
|
|
47
|
-
|
|
48
|
-
// Implied Global singletons
|
|
49
|
-
console: 'readable',
|
|
50
|
-
|
|
51
|
-
// Implied Global Classes
|
|
52
|
-
Array: 'readable',
|
|
53
|
-
Blob: 'readable',
|
|
54
|
-
Buffer: 'readable',
|
|
55
|
-
File: 'readable',
|
|
56
|
-
FormData: 'readable',
|
|
57
|
-
JSON: 'readable',
|
|
58
|
-
Promise: 'readable',
|
|
59
|
-
RegExp: 'readable',
|
|
60
|
-
URL: 'readable',
|
|
61
|
-
URLSearchParams: 'readable',
|
|
39
|
+
...globals.node,
|
|
62
40
|
},
|
|
63
41
|
},
|
|
64
42
|
},
|
|
@@ -129,12 +107,8 @@ export default [
|
|
|
129
107
|
// Wrangler ignore rules
|
|
130
108
|
languageOptions: {
|
|
131
109
|
globals: {
|
|
132
|
-
//
|
|
133
|
-
|
|
134
|
-
Headers: 'readable',
|
|
135
|
-
TextEncoder: 'readable',
|
|
136
|
-
Request: 'readable',
|
|
137
|
-
Response: 'readable',
|
|
110
|
+
// Global Cloudflare Worker Classes
|
|
111
|
+
...globals.worker,
|
|
138
112
|
},
|
|
139
113
|
},
|
|
140
114
|
rules: {
|
|
@@ -149,8 +123,8 @@ export default [
|
|
|
149
123
|
languageOptions: {
|
|
150
124
|
parser: eslintParser,
|
|
151
125
|
globals: {
|
|
152
|
-
app: '
|
|
153
|
-
db: '
|
|
126
|
+
app: 'readonly', // Global backend App object
|
|
127
|
+
db: 'readonly', // Global app.db shortcut
|
|
154
128
|
},
|
|
155
129
|
},
|
|
156
130
|
rules: {
|
|
@@ -165,8 +139,7 @@ export default [
|
|
|
165
139
|
files: ['**/*.js', '**/*.mjs'],
|
|
166
140
|
languageOptions: {
|
|
167
141
|
globals: {
|
|
168
|
-
|
|
169
|
-
process: 'readable',
|
|
142
|
+
...globals.node,
|
|
170
143
|
},
|
|
171
144
|
},
|
|
172
145
|
rules: {
|
|
@@ -175,17 +148,14 @@ export default [
|
|
|
175
148
|
},
|
|
176
149
|
// }}}
|
|
177
150
|
|
|
178
|
-
// Mocha test files {{{
|
|
151
|
+
// Mocha/Chai test files {{{
|
|
179
152
|
{
|
|
180
153
|
files: ['**/test/**/*.js'],
|
|
181
154
|
languageOptions: {
|
|
182
155
|
globals: {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
before: 'readonly',
|
|
187
|
-
describe: 'readonly',
|
|
188
|
-
it: 'readonly',
|
|
156
|
+
...globals.chai,
|
|
157
|
+
...globals.mocha,
|
|
158
|
+
...globals.node,
|
|
189
159
|
},
|
|
190
160
|
},
|
|
191
161
|
},
|
|
@@ -196,15 +166,10 @@ export default [
|
|
|
196
166
|
files: ['**/*.vue'],
|
|
197
167
|
languageOptions: {
|
|
198
168
|
globals: {
|
|
199
|
-
// See also: "Generic globals" > languageOptions > globals
|
|
200
|
-
|
|
201
169
|
// Not-really-a-thing-but-I'll-allow-it globals
|
|
202
|
-
app: '
|
|
170
|
+
app: 'readonly', // Generally the Vue.$root frontend app object
|
|
203
171
|
|
|
204
|
-
|
|
205
|
-
document: 'readable',
|
|
206
|
-
navigator: 'readable',
|
|
207
|
-
window: 'readable',
|
|
172
|
+
...globals.browser,
|
|
208
173
|
},
|
|
209
174
|
parser: eslintParser,
|
|
210
175
|
parserOptions: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momsfriendlydevco/eslint-config",
|
|
3
3
|
"description": "ESLint plugin for @MomsFriendlyDevCo projects",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "eslint --config index.js test/data"
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/MomsFriendlyDevCo/eslint#readme",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"eslint-plugin-jsdoc": "^
|
|
28
|
-
"eslint-plugin-unicorn": "^
|
|
29
|
-
"eslint-plugin-vue": "^10.
|
|
30
|
-
"
|
|
27
|
+
"eslint-plugin-jsdoc": "^62.8.0",
|
|
28
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
29
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
30
|
+
"globals": "^17.4.0",
|
|
31
|
+
"vue-eslint-parser": "^10.4.0"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
|
-
"eslint": "^
|
|
34
|
+
"eslint": "^10.0.3"
|
|
34
35
|
}
|
|
35
36
|
}
|