@willbooster/eslint-config-js-react 9.0.0 → 9.1.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/.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
- *.code-workspace
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
- !.vscode/*.code-snippets
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 variables file
443
+ # dotenv environment variable files
401
444
  .env
402
- .env.test
403
- .env.production
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/.eslintrc.json CHANGED
@@ -1,5 +1,10 @@
1
1
  {
2
- "extends": ["plugin:react/recommended", "plugin:react-hooks/recommended", "@willbooster/eslint-config-js"],
2
+ "extends": [
3
+ "plugin:react/recommended",
4
+ "plugin:react/jsx-runtime",
5
+ "plugin:react-hooks/recommended",
6
+ "@willbooster/eslint-config-js"
7
+ ],
3
8
  "rules": {
4
9
  "react/jsx-sort-props": [
5
10
  "error",
package/.lintstagedrc.cjs CHANGED
@@ -1,16 +1,13 @@
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}': [
4
+ './{src,__tests__,scripts}/**/*.{cjs,js,jsx,mjs,ts,tsx}': [
6
5
  'eslint --fix --rule "{ react-hooks/exhaustive-deps: 0 }"',
7
6
  'prettier --write',
8
7
  ],
9
8
  './**/*.{cjs,css,htm,html,js,json,json5,jsx,md,mjs,scss,ts,tsx,vue,yaml,yml}': (files) => {
10
- files = micromatch.not(files, './{src,__tests__}/**/*.{cjs,js,jsx,mjs,ts,tsx}');
11
- const filteredFiles = files
12
- .filter((file) => !file.includes('/test-fixtures/'))
13
- .map((file) => path.relative('', file));
9
+ files = micromatch.not(files, './{src,__tests__,scripts}/**/*.{cjs,js,jsx,mjs,ts,tsx}');
10
+ const filteredFiles = files.filter((file) => !file.includes('/test-fixtures/'));
14
11
  if (filteredFiles.length === 0) return [];
15
12
  const commands = [`prettier --write ${filteredFiles.join(' ')}`];
16
13
  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
- *.code-workspace
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
- !.vscode/*.code-snippets
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 variables file
440
+ # dotenv environment variable files
398
441
  .env
399
- .env.test
400
- .env.production
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,14 +4,16 @@ A ESLint config for JavaScript projects using React.
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
- @willbooster/eslint-config-js-react \\
9
- eslint \\
10
- eslint-config-prettier \\
11
- eslint-plugin-import \\
12
- eslint-plugin-prettier \\
13
- eslint-plugin-react \\
14
- eslint-plugin-react-hooks \\
15
- prettier \\
7
+ yarn add -D @willbooster/eslint-config-js \
8
+ @willbooster/eslint-config-js-react \
9
+ eslint \
10
+ eslint-config-prettier \
11
+ eslint-plugin-import \
12
+ eslint-plugin-prettier \
13
+ eslint-plugin-sort-class-members \
14
+ eslint-plugin-sort-destructure-keys \
15
+ eslint-plugin-react \
16
+ eslint-plugin-react-hooks \
17
+ prettier \
16
18
  @willbooster/prettier-config
17
19
  ```
@@ -2,7 +2,6 @@
2
2
 
3
3
  const child_process = require('child_process');
4
4
 
5
- const React = require('react');
6
5
  const { useImmer } = require('use-immer');
7
6
 
8
7
  child_process.exec('echo 0');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/eslint-config-js-react",
3
- "version": "9.0.0",
3
+ "version": "9.1.2",
4
4
  "description": "A ESLint config for JavaScript projects using React",
5
5
  "license": "Apache-2.0",
6
6
  "author": "WillBooster Inc.",
@@ -8,35 +8,35 @@
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 --rule \"{ react-hooks/exhaustive-deps: 0 }\"",
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
  "dependencies": {
18
- "@willbooster/eslint-config-js": "9.0.0"
18
+ "@willbooster/eslint-config-js": "9.0.3"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/eslint": "8.4.0",
21
+ "@types/eslint": "8.4.6",
22
22
  "@types/micromatch": "4.0.2",
23
- "@types/react": "17.0.38",
24
- "@willbooster/prettier-config": "9.0.0",
25
- "eslint": "8.7.0",
26
- "eslint-config-prettier": "8.3.0",
27
- "eslint-plugin-import": "2.25.4",
28
- "eslint-plugin-react": "7.28.0",
29
- "eslint-plugin-react-hooks": "4.3.0",
23
+ "@types/react": "18.0.17",
24
+ "@willbooster/prettier-config": "9.0.1",
25
+ "eslint": "8.22.0",
26
+ "eslint-config-prettier": "8.5.0",
27
+ "eslint-plugin-import": "2.26.0",
28
+ "eslint-plugin-react": "7.30.1",
29
+ "eslint-plugin-react-hooks": "4.6.0",
30
30
  "eslint-plugin-sort-class-members": "1.14.1",
31
31
  "eslint-plugin-sort-destructure-keys": "1.4.0",
32
- "lint-staged": "12.2.2",
33
- "micromatch": "4.0.4",
34
- "prettier": "2.5.1",
35
- "react": "17.0.2",
36
- "sort-package-json": "1.53.1"
32
+ "lint-staged": "13.0.3",
33
+ "micromatch": "4.0.5",
34
+ "prettier": "2.7.1",
35
+ "react": "18.2.0",
36
+ "sort-package-json": "1.57.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@willbooster/prettier-config": "9.0.0",
39
+ "@willbooster/prettier-config": "9.0.1",
40
40
  "eslint": ">=8",
41
41
  "eslint-config-prettier": ">=8",
42
42
  "eslint-plugin-import": ">=2",