@willbooster/eslint-config-js 9.0.0 → 9.0.3
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/.eslintignore +57 -7
- package/.lintstagedrc.cjs +3 -6
- package/.prettierignore +57 -7
- package/README.md +8 -6
- package/package.json +12 -12
package/.eslintignore
CHANGED
|
@@ -21,7 +21,8 @@ test-fixtures/
|
|
|
21
21
|
dist/
|
|
22
22
|
temp/
|
|
23
23
|
Icon[
|
|
24
|
-
|
|
24
|
+
*.sqlite3
|
|
25
|
+
*.sqlite3-journal
|
|
25
26
|
# Created by https://www.toptal.com/developers/gitignore/api/windows
|
|
26
27
|
# Edit at https://www.toptal.com/developers/gitignore?templates=windows
|
|
27
28
|
|
|
@@ -84,6 +85,10 @@ Network Trash Folder
|
|
|
84
85
|
Temporary Items
|
|
85
86
|
.apdisk
|
|
86
87
|
|
|
88
|
+
### macOS Patch ###
|
|
89
|
+
# iCloud generated files
|
|
90
|
+
*.icloud
|
|
91
|
+
|
|
87
92
|
# End of https://www.toptal.com/developers/gitignore/api/macos
|
|
88
93
|
|
|
89
94
|
# Created by https://www.toptal.com/developers/gitignore/api/linux
|
|
@@ -173,6 +178,9 @@ atlassian-ide-plugin.xml
|
|
|
173
178
|
# Cursive Clojure plugin
|
|
174
179
|
.idea/replstate.xml
|
|
175
180
|
|
|
181
|
+
# SonarLint plugin
|
|
182
|
+
.idea/sonarlint/
|
|
183
|
+
|
|
176
184
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
177
185
|
com_crashlytics_export_strings.xml
|
|
178
186
|
crashlytics.properties
|
|
@@ -215,6 +223,10 @@ fabric.properties
|
|
|
215
223
|
# https://plugins.jetbrains.com/plugin/12206-codestream
|
|
216
224
|
.idea/codestream.xml
|
|
217
225
|
|
|
226
|
+
# Azure Toolkit for IntelliJ plugin
|
|
227
|
+
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
|
228
|
+
.idea/**/azureSettings.xml
|
|
229
|
+
|
|
218
230
|
# End of https://www.toptal.com/developers/gitignore/api/jetbrains
|
|
219
231
|
|
|
220
232
|
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode
|
|
@@ -226,18 +238,24 @@ fabric.properties
|
|
|
226
238
|
!.vscode/tasks.json
|
|
227
239
|
!.vscode/launch.json
|
|
228
240
|
!.vscode/extensions.json
|
|
229
|
-
|
|
241
|
+
!.vscode/*.code-snippets
|
|
230
242
|
|
|
231
243
|
# Local History for Visual Studio Code
|
|
232
244
|
.history/
|
|
233
245
|
|
|
246
|
+
# Built Visual Studio Code Extensions
|
|
247
|
+
*.vsix
|
|
248
|
+
|
|
234
249
|
### VisualStudioCode Patch ###
|
|
235
250
|
# Ignore all local history of files
|
|
236
251
|
.history
|
|
237
252
|
.ionide
|
|
238
253
|
|
|
239
254
|
# Support for Project snippet scope
|
|
240
|
-
|
|
255
|
+
.vscode/*.code-snippets
|
|
256
|
+
|
|
257
|
+
# Ignore code-workspaces
|
|
258
|
+
*.code-workspace
|
|
241
259
|
|
|
242
260
|
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
|
|
243
261
|
|
|
@@ -322,6 +340,28 @@ tags
|
|
|
322
340
|
|
|
323
341
|
# End of https://www.toptal.com/developers/gitignore/api/vim
|
|
324
342
|
|
|
343
|
+
# Created by https://www.toptal.com/developers/gitignore/api/yarn
|
|
344
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=yarn
|
|
345
|
+
|
|
346
|
+
### yarn ###
|
|
347
|
+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
|
348
|
+
|
|
349
|
+
.yarn/*
|
|
350
|
+
!.yarn/releases
|
|
351
|
+
!.yarn/patches
|
|
352
|
+
!.yarn/plugins
|
|
353
|
+
!.yarn/sdks
|
|
354
|
+
!.yarn/versions
|
|
355
|
+
|
|
356
|
+
# if you are NOT using Zero-installs, then:
|
|
357
|
+
# comment the following lines
|
|
358
|
+
# !.yarn/cache
|
|
359
|
+
|
|
360
|
+
# and uncomment the following lines
|
|
361
|
+
.pnp.*
|
|
362
|
+
|
|
363
|
+
# End of https://www.toptal.com/developers/gitignore/api/yarn
|
|
364
|
+
|
|
325
365
|
# Created by https://www.toptal.com/developers/gitignore/api/node
|
|
326
366
|
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
|
327
367
|
|
|
@@ -382,6 +422,9 @@ web_modules/
|
|
|
382
422
|
# Optional eslint cache
|
|
383
423
|
.eslintcache
|
|
384
424
|
|
|
425
|
+
# Optional stylelint cache
|
|
426
|
+
.stylelintcache
|
|
427
|
+
|
|
385
428
|
# Microbundle cache
|
|
386
429
|
.rpt2_cache/
|
|
387
430
|
.rts2_cache_cjs/
|
|
@@ -397,10 +440,12 @@ web_modules/
|
|
|
397
440
|
# Yarn Integrity file
|
|
398
441
|
.yarn-integrity
|
|
399
442
|
|
|
400
|
-
# dotenv environment
|
|
443
|
+
# dotenv environment variable files
|
|
401
444
|
.env
|
|
402
|
-
.env.
|
|
403
|
-
.env.
|
|
445
|
+
.env.development.local
|
|
446
|
+
.env.test.local
|
|
447
|
+
.env.production.local
|
|
448
|
+
.env.local
|
|
404
449
|
|
|
405
450
|
# parcel-bundler cache (https://parceljs.org/)
|
|
406
451
|
.cache
|
|
@@ -423,6 +468,12 @@ dist
|
|
|
423
468
|
# vuepress build output
|
|
424
469
|
.vuepress/dist
|
|
425
470
|
|
|
471
|
+
# vuepress v2.x temp and cache directory
|
|
472
|
+
.temp
|
|
473
|
+
|
|
474
|
+
# Docusaurus cache and generated files
|
|
475
|
+
.docusaurus
|
|
476
|
+
|
|
426
477
|
# Serverless directories
|
|
427
478
|
.serverless/
|
|
428
479
|
|
|
@@ -450,7 +501,6 @@ dist
|
|
|
450
501
|
.webpack/
|
|
451
502
|
|
|
452
503
|
# Optional stylelint cache
|
|
453
|
-
.stylelintcache
|
|
454
504
|
|
|
455
505
|
# SvelteKit build / generate output
|
|
456
506
|
.svelte-kit
|
package/.lintstagedrc.cjs
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
1
|
const micromatch = require('micromatch');
|
|
3
2
|
|
|
4
3
|
module.exports = {
|
|
5
|
-
'./{src,__tests__}/**/*.{cjs,js,jsx,mjs,ts,tsx}': ['eslint --fix', 'prettier --write'],
|
|
4
|
+
'./{src,__tests__,scripts}/**/*.{cjs,js,jsx,mjs,ts,tsx}': ['eslint --fix', 'prettier --write'],
|
|
6
5
|
'./**/*.{cjs,css,htm,html,js,json,json5,jsx,md,mjs,scss,ts,tsx,vue,yaml,yml}': (files) => {
|
|
7
|
-
files = micromatch.not(files, './{src,__tests__}/**/*.{cjs,js,jsx,mjs,ts,tsx}');
|
|
8
|
-
const filteredFiles = files
|
|
9
|
-
.filter((file) => !file.includes('/test-fixtures/'))
|
|
10
|
-
.map((file) => path.relative('', file));
|
|
6
|
+
files = micromatch.not(files, './{src,__tests__,scripts}/**/*.{cjs,js,jsx,mjs,ts,tsx}');
|
|
7
|
+
const filteredFiles = files.filter((file) => !file.includes('/test-fixtures/'));
|
|
11
8
|
if (filteredFiles.length === 0) return [];
|
|
12
9
|
const commands = [`prettier --write ${filteredFiles.join(' ')}`];
|
|
13
10
|
if (filteredFiles.some((file) => file.endsWith('package.json'))) {
|
package/.prettierignore
CHANGED
|
@@ -18,7 +18,8 @@ test-fixtures/
|
|
|
18
18
|
dist/
|
|
19
19
|
temp/
|
|
20
20
|
Icon[
|
|
21
|
-
|
|
21
|
+
*.sqlite3
|
|
22
|
+
*.sqlite3-journal
|
|
22
23
|
# Created by https://www.toptal.com/developers/gitignore/api/windows
|
|
23
24
|
# Edit at https://www.toptal.com/developers/gitignore?templates=windows
|
|
24
25
|
|
|
@@ -81,6 +82,10 @@ Network Trash Folder
|
|
|
81
82
|
Temporary Items
|
|
82
83
|
.apdisk
|
|
83
84
|
|
|
85
|
+
### macOS Patch ###
|
|
86
|
+
# iCloud generated files
|
|
87
|
+
*.icloud
|
|
88
|
+
|
|
84
89
|
# End of https://www.toptal.com/developers/gitignore/api/macos
|
|
85
90
|
|
|
86
91
|
# Created by https://www.toptal.com/developers/gitignore/api/linux
|
|
@@ -170,6 +175,9 @@ atlassian-ide-plugin.xml
|
|
|
170
175
|
# Cursive Clojure plugin
|
|
171
176
|
.idea/replstate.xml
|
|
172
177
|
|
|
178
|
+
# SonarLint plugin
|
|
179
|
+
.idea/sonarlint/
|
|
180
|
+
|
|
173
181
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
174
182
|
com_crashlytics_export_strings.xml
|
|
175
183
|
crashlytics.properties
|
|
@@ -212,6 +220,10 @@ fabric.properties
|
|
|
212
220
|
# https://plugins.jetbrains.com/plugin/12206-codestream
|
|
213
221
|
.idea/codestream.xml
|
|
214
222
|
|
|
223
|
+
# Azure Toolkit for IntelliJ plugin
|
|
224
|
+
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
|
225
|
+
.idea/**/azureSettings.xml
|
|
226
|
+
|
|
215
227
|
# End of https://www.toptal.com/developers/gitignore/api/jetbrains
|
|
216
228
|
|
|
217
229
|
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode
|
|
@@ -223,18 +235,24 @@ fabric.properties
|
|
|
223
235
|
!.vscode/tasks.json
|
|
224
236
|
!.vscode/launch.json
|
|
225
237
|
!.vscode/extensions.json
|
|
226
|
-
|
|
238
|
+
!.vscode/*.code-snippets
|
|
227
239
|
|
|
228
240
|
# Local History for Visual Studio Code
|
|
229
241
|
.history/
|
|
230
242
|
|
|
243
|
+
# Built Visual Studio Code Extensions
|
|
244
|
+
*.vsix
|
|
245
|
+
|
|
231
246
|
### VisualStudioCode Patch ###
|
|
232
247
|
# Ignore all local history of files
|
|
233
248
|
.history
|
|
234
249
|
.ionide
|
|
235
250
|
|
|
236
251
|
# Support for Project snippet scope
|
|
237
|
-
|
|
252
|
+
.vscode/*.code-snippets
|
|
253
|
+
|
|
254
|
+
# Ignore code-workspaces
|
|
255
|
+
*.code-workspace
|
|
238
256
|
|
|
239
257
|
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
|
|
240
258
|
|
|
@@ -319,6 +337,28 @@ tags
|
|
|
319
337
|
|
|
320
338
|
# End of https://www.toptal.com/developers/gitignore/api/vim
|
|
321
339
|
|
|
340
|
+
# Created by https://www.toptal.com/developers/gitignore/api/yarn
|
|
341
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=yarn
|
|
342
|
+
|
|
343
|
+
### yarn ###
|
|
344
|
+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
|
345
|
+
|
|
346
|
+
.yarn/*
|
|
347
|
+
!.yarn/releases
|
|
348
|
+
!.yarn/patches
|
|
349
|
+
!.yarn/plugins
|
|
350
|
+
!.yarn/sdks
|
|
351
|
+
!.yarn/versions
|
|
352
|
+
|
|
353
|
+
# if you are NOT using Zero-installs, then:
|
|
354
|
+
# comment the following lines
|
|
355
|
+
# !.yarn/cache
|
|
356
|
+
|
|
357
|
+
# and uncomment the following lines
|
|
358
|
+
.pnp.*
|
|
359
|
+
|
|
360
|
+
# End of https://www.toptal.com/developers/gitignore/api/yarn
|
|
361
|
+
|
|
322
362
|
# Created by https://www.toptal.com/developers/gitignore/api/node
|
|
323
363
|
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
|
324
364
|
|
|
@@ -379,6 +419,9 @@ web_modules/
|
|
|
379
419
|
# Optional eslint cache
|
|
380
420
|
.eslintcache
|
|
381
421
|
|
|
422
|
+
# Optional stylelint cache
|
|
423
|
+
.stylelintcache
|
|
424
|
+
|
|
382
425
|
# Microbundle cache
|
|
383
426
|
.rpt2_cache/
|
|
384
427
|
.rts2_cache_cjs/
|
|
@@ -394,10 +437,12 @@ web_modules/
|
|
|
394
437
|
# Yarn Integrity file
|
|
395
438
|
.yarn-integrity
|
|
396
439
|
|
|
397
|
-
# dotenv environment
|
|
440
|
+
# dotenv environment variable files
|
|
398
441
|
.env
|
|
399
|
-
.env.
|
|
400
|
-
.env.
|
|
442
|
+
.env.development.local
|
|
443
|
+
.env.test.local
|
|
444
|
+
.env.production.local
|
|
445
|
+
.env.local
|
|
401
446
|
|
|
402
447
|
# parcel-bundler cache (https://parceljs.org/)
|
|
403
448
|
.cache
|
|
@@ -420,6 +465,12 @@ dist
|
|
|
420
465
|
# vuepress build output
|
|
421
466
|
.vuepress/dist
|
|
422
467
|
|
|
468
|
+
# vuepress v2.x temp and cache directory
|
|
469
|
+
.temp
|
|
470
|
+
|
|
471
|
+
# Docusaurus cache and generated files
|
|
472
|
+
.docusaurus
|
|
473
|
+
|
|
423
474
|
# Serverless directories
|
|
424
475
|
.serverless/
|
|
425
476
|
|
|
@@ -447,7 +498,6 @@ dist
|
|
|
447
498
|
.webpack/
|
|
448
499
|
|
|
449
500
|
# Optional stylelint cache
|
|
450
|
-
.stylelintcache
|
|
451
501
|
|
|
452
502
|
# SvelteKit build / generate output
|
|
453
503
|
.svelte-kit
|
package/README.md
CHANGED
|
@@ -4,11 +4,13 @@ A ESLint config for JavaScript projects.
|
|
|
4
4
|
You need to do the following command to install peer dependencies.
|
|
5
5
|
|
|
6
6
|
```sh
|
|
7
|
-
yarn add -D @willbooster/eslint-config-js
|
|
8
|
-
eslint
|
|
9
|
-
eslint-config-prettier
|
|
10
|
-
eslint-plugin-import
|
|
11
|
-
eslint-plugin-prettier
|
|
12
|
-
|
|
7
|
+
yarn add -D @willbooster/eslint-config-js \
|
|
8
|
+
eslint \
|
|
9
|
+
eslint-config-prettier \
|
|
10
|
+
eslint-plugin-import \
|
|
11
|
+
eslint-plugin-prettier \
|
|
12
|
+
eslint-plugin-sort-class-members \
|
|
13
|
+
eslint-plugin-sort-destructure-keys \
|
|
14
|
+
prettier \
|
|
13
15
|
@willbooster/prettier-config
|
|
14
16
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/eslint-config-js",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "A ESLint config for JavaScript projects",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "WillBooster Inc.",
|
|
@@ -8,28 +8,28 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"cleanup": "yarn format && yarn lint-fix",
|
|
10
10
|
"format": "sort-package-json && yarn prettify",
|
|
11
|
-
"lint": "eslint --color \"./{src,__tests__}/**/*.{cjs,js,jsx,mjs,ts,tsx}\"",
|
|
11
|
+
"lint": "eslint --color \"./{src,__tests__,scripts}/**/*.{cjs,js,jsx,mjs,ts,tsx}\"",
|
|
12
12
|
"lint-fix": "yarn lint --fix",
|
|
13
13
|
"prettify": "prettier --color --write \"**/{.*/,}*.{cjs,css,htm,html,js,json,json5,jsx,md,mjs,scss,ts,tsx,vue,yaml,yml}\" \"!**/test-fixtures/**\"",
|
|
14
14
|
"test": "yarn lint"
|
|
15
15
|
},
|
|
16
16
|
"prettier": "@willbooster/prettier-config",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/eslint": "8.4.
|
|
18
|
+
"@types/eslint": "8.4.6",
|
|
19
19
|
"@types/micromatch": "4.0.2",
|
|
20
|
-
"@willbooster/prettier-config": "9.0.
|
|
21
|
-
"eslint": "8.
|
|
22
|
-
"eslint-config-prettier": "8.
|
|
23
|
-
"eslint-plugin-import": "2.
|
|
20
|
+
"@willbooster/prettier-config": "9.0.1",
|
|
21
|
+
"eslint": "8.22.0",
|
|
22
|
+
"eslint-config-prettier": "8.5.0",
|
|
23
|
+
"eslint-plugin-import": "2.26.0",
|
|
24
24
|
"eslint-plugin-sort-class-members": "1.14.1",
|
|
25
25
|
"eslint-plugin-sort-destructure-keys": "1.4.0",
|
|
26
|
-
"lint-staged": "
|
|
27
|
-
"micromatch": "4.0.
|
|
28
|
-
"prettier": "2.
|
|
29
|
-
"sort-package-json": "1.
|
|
26
|
+
"lint-staged": "13.0.3",
|
|
27
|
+
"micromatch": "4.0.5",
|
|
28
|
+
"prettier": "2.7.1",
|
|
29
|
+
"sort-package-json": "1.57.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@willbooster/prettier-config": "9.0.
|
|
32
|
+
"@willbooster/prettier-config": "9.0.1",
|
|
33
33
|
"eslint": ">=8",
|
|
34
34
|
"eslint-config-prettier": ">=8",
|
|
35
35
|
"eslint-plugin-import": ">=2",
|