@willbooster/eslint-config-js-react 6.5.0 → 6.5.1

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 ADDED
@@ -0,0 +1,458 @@
1
+ # Project-specific settings
2
+
3
+
4
+ # Generated by @willbooster/willboosterify
5
+
6
+ 3rd-party/
7
+ @types/
8
+ __generated__/
9
+ android/
10
+ ios/
11
+ no-format/
12
+ test-fixtures/
13
+ *.config.js
14
+ *.d.ts
15
+ *.min.js
16
+ .yarn/
17
+ .pnp.js
18
+
19
+
20
+ .devcontainer/
21
+ dist/
22
+ temp/
23
+ Icon[
24
+
25
+ # Created by https://www.toptal.com/developers/gitignore/api/windows
26
+ # Edit at https://www.toptal.com/developers/gitignore?templates=windows
27
+
28
+ ### Windows ###
29
+ # Windows thumbnail cache files
30
+ Thumbs.db
31
+ Thumbs.db:encryptable
32
+ ehthumbs.db
33
+ ehthumbs_vista.db
34
+
35
+ # Dump file
36
+ *.stackdump
37
+
38
+ # Folder config file
39
+ [Dd]esktop.ini
40
+
41
+ # Recycle Bin used on file shares
42
+ $RECYCLE.BIN/
43
+
44
+ # Windows Installer files
45
+ *.cab
46
+ *.msi
47
+ *.msix
48
+ *.msm
49
+ *.msp
50
+
51
+ # Windows shortcuts
52
+ *.lnk
53
+
54
+ # End of https://www.toptal.com/developers/gitignore/api/windows
55
+
56
+ # Created by https://www.toptal.com/developers/gitignore/api/macos
57
+ # Edit at https://www.toptal.com/developers/gitignore?templates=macos
58
+
59
+ ### macOS ###
60
+ # General
61
+ .DS_Store
62
+ .AppleDouble
63
+ .LSOverride
64
+
65
+ # Icon must end with two \r
66
+ Icon
67
+
68
+ # Thumbnails
69
+ ._*
70
+
71
+ # Files that might appear in the root of a volume
72
+ .DocumentRevisions-V100
73
+ .fseventsd
74
+ .Spotlight-V100
75
+ .TemporaryItems
76
+ .Trashes
77
+ .VolumeIcon.icns
78
+ .com.apple.timemachine.donotpresent
79
+
80
+ # Directories potentially created on remote AFP share
81
+ .AppleDB
82
+ .AppleDesktop
83
+ Network Trash Folder
84
+ Temporary Items
85
+ .apdisk
86
+
87
+ # End of https://www.toptal.com/developers/gitignore/api/macos
88
+
89
+ # Created by https://www.toptal.com/developers/gitignore/api/linux
90
+ # Edit at https://www.toptal.com/developers/gitignore?templates=linux
91
+
92
+ ### Linux ###
93
+ *~
94
+
95
+ # temporary files which can be created if a process still has a handle open of a deleted file
96
+ .fuse_hidden*
97
+
98
+ # KDE directory preferences
99
+ .directory
100
+
101
+ # Linux trash folder which might appear on any partition or disk
102
+ .Trash-*
103
+
104
+ # .nfs files are created when an open file is removed but is still being accessed
105
+ .nfs*
106
+
107
+ # End of https://www.toptal.com/developers/gitignore/api/linux
108
+
109
+ # Created by https://www.toptal.com/developers/gitignore/api/jetbrains
110
+ # Edit at https://www.toptal.com/developers/gitignore?templates=jetbrains
111
+
112
+ ### JetBrains ###
113
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
114
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
115
+
116
+ # User-specific stuff
117
+ .idea/**/workspace.xml
118
+ .idea/**/tasks.xml
119
+ .idea/**/usage.statistics.xml
120
+ .idea/**/dictionaries
121
+ .idea/**/shelf
122
+
123
+ # AWS User-specific
124
+ .idea/**/aws.xml
125
+
126
+ # Generated files
127
+ .idea/**/contentModel.xml
128
+
129
+ # Sensitive or high-churn files
130
+ .idea/**/dataSources/
131
+ .idea/**/dataSources.ids
132
+ .idea/**/dataSources.local.xml
133
+ .idea/**/sqlDataSources.xml
134
+ .idea/**/dynamic.xml
135
+ .idea/**/uiDesigner.xml
136
+ .idea/**/dbnavigator.xml
137
+
138
+ # Gradle
139
+ .idea/**/gradle.xml
140
+ .idea/**/libraries
141
+
142
+ # Gradle and Maven with auto-import
143
+ # When using Gradle or Maven with auto-import, you should exclude module files,
144
+ # since they will be recreated, and may cause churn. Uncomment if using
145
+ # auto-import.
146
+ # .idea/artifacts
147
+ # .idea/compiler.xml
148
+ # .idea/jarRepositories.xml
149
+ # .idea/modules.xml
150
+ # .idea/*.iml
151
+ # .idea/modules
152
+ # *.iml
153
+ # *.ipr
154
+
155
+ # CMake
156
+ cmake-build-*/
157
+
158
+ # Mongo Explorer plugin
159
+ .idea/**/mongoSettings.xml
160
+
161
+ # File-based project format
162
+ *.iws
163
+
164
+ # IntelliJ
165
+ out/
166
+
167
+ # mpeltonen/sbt-idea plugin
168
+ .idea_modules/
169
+
170
+ # JIRA plugin
171
+ atlassian-ide-plugin.xml
172
+
173
+ # Cursive Clojure plugin
174
+ .idea/replstate.xml
175
+
176
+ # Crashlytics plugin (for Android Studio and IntelliJ)
177
+ com_crashlytics_export_strings.xml
178
+ crashlytics.properties
179
+ crashlytics-build.properties
180
+ fabric.properties
181
+
182
+ # Editor-based Rest Client
183
+ .idea/httpRequests
184
+
185
+ # Android studio 3.1+ serialized cache file
186
+ .idea/caches/build_file_checksums.ser
187
+
188
+ ### JetBrains Patch ###
189
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
190
+
191
+ # *.iml
192
+ # modules.xml
193
+ # .idea/misc.xml
194
+ # *.ipr
195
+
196
+ # Sonarlint plugin
197
+ # https://plugins.jetbrains.com/plugin/7973-sonarlint
198
+ .idea/**/sonarlint/
199
+
200
+ # SonarQube Plugin
201
+ # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
202
+ .idea/**/sonarIssues.xml
203
+
204
+ # Markdown Navigator plugin
205
+ # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
206
+ .idea/**/markdown-navigator.xml
207
+ .idea/**/markdown-navigator-enh.xml
208
+ .idea/**/markdown-navigator/
209
+
210
+ # Cache file creation bug
211
+ # See https://youtrack.jetbrains.com/issue/JBR-2257
212
+ .idea/$CACHE_FILE$
213
+
214
+ # CodeStream plugin
215
+ # https://plugins.jetbrains.com/plugin/12206-codestream
216
+ .idea/codestream.xml
217
+
218
+ # End of https://www.toptal.com/developers/gitignore/api/jetbrains
219
+
220
+ # Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode
221
+ # Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode
222
+
223
+ ### VisualStudioCode ###
224
+ .vscode/*
225
+ !.vscode/settings.json
226
+ !.vscode/tasks.json
227
+ !.vscode/launch.json
228
+ !.vscode/extensions.json
229
+ *.code-workspace
230
+
231
+ # Local History for Visual Studio Code
232
+ .history/
233
+
234
+ ### VisualStudioCode Patch ###
235
+ # Ignore all local history of files
236
+ .history
237
+ .ionide
238
+
239
+ # Support for Project snippet scope
240
+ !.vscode/*.code-snippets
241
+
242
+ # End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
243
+
244
+ # Created by https://www.toptal.com/developers/gitignore/api/emacs
245
+ # Edit at https://www.toptal.com/developers/gitignore?templates=emacs
246
+
247
+ ### Emacs ###
248
+ # -*- mode: gitignore; -*-
249
+ *~
250
+ \#*\#
251
+ /.emacs.desktop
252
+ /.emacs.desktop.lock
253
+ *.elc
254
+ auto-save-list
255
+ tramp
256
+ .\#*
257
+
258
+ # Org-mode
259
+ .org-id-locations
260
+ *_archive
261
+
262
+ # flymake-mode
263
+ *_flymake.*
264
+
265
+ # eshell files
266
+ /eshell/history
267
+ /eshell/lastdir
268
+
269
+ # elpa packages
270
+ /elpa/
271
+
272
+ # reftex files
273
+ *.rel
274
+
275
+ # AUCTeX auto folder
276
+ /auto/
277
+
278
+ # cask packages
279
+ .cask/
280
+ dist/
281
+
282
+ # Flycheck
283
+ flycheck_*.el
284
+
285
+ # server auth directory
286
+ /server/
287
+
288
+ # projectiles files
289
+ .projectile
290
+
291
+ # directory configuration
292
+ .dir-locals.el
293
+
294
+ # network security
295
+ /network-security.data
296
+
297
+ # End of https://www.toptal.com/developers/gitignore/api/emacs
298
+
299
+ # Created by https://www.toptal.com/developers/gitignore/api/vim
300
+ # Edit at https://www.toptal.com/developers/gitignore?templates=vim
301
+
302
+ ### Vim ###
303
+ # Swap
304
+ [._]*.s[a-v][a-z]
305
+ !*.svg # comment out if you don't need vector files
306
+ [._]*.sw[a-p]
307
+ [._]s[a-rt-v][a-z]
308
+ [._]ss[a-gi-z]
309
+ [._]sw[a-p]
310
+
311
+ # Session
312
+ Session.vim
313
+ Sessionx.vim
314
+
315
+ # Temporary
316
+ .netrwhist
317
+ *~
318
+ # Auto-generated tag files
319
+ tags
320
+ # Persistent undo
321
+ [._]*.un~
322
+
323
+ # End of https://www.toptal.com/developers/gitignore/api/vim
324
+
325
+ # Created by https://www.toptal.com/developers/gitignore/api/node
326
+ # Edit at https://www.toptal.com/developers/gitignore?templates=node
327
+
328
+ ### Node ###
329
+ # Logs
330
+ logs
331
+ *.log
332
+ npm-debug.log*
333
+ yarn-debug.log*
334
+ yarn-error.log*
335
+ lerna-debug.log*
336
+ .pnpm-debug.log*
337
+
338
+ # Diagnostic reports (https://nodejs.org/api/report.html)
339
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
340
+
341
+ # Runtime data
342
+ pids
343
+ *.pid
344
+ *.seed
345
+ *.pid.lock
346
+
347
+ # Directory for instrumented libs generated by jscoverage/JSCover
348
+ lib-cov
349
+
350
+ # Coverage directory used by tools like istanbul
351
+ coverage
352
+ *.lcov
353
+
354
+ # nyc test coverage
355
+ .nyc_output
356
+
357
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
358
+ .grunt
359
+
360
+ # Bower dependency directory (https://bower.io/)
361
+ bower_components
362
+
363
+ # node-waf configuration
364
+ .lock-wscript
365
+
366
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
367
+ build/Release
368
+
369
+ # Dependency directories
370
+ node_modules/
371
+ jspm_packages/
372
+
373
+ # Snowpack dependency directory (https://snowpack.dev/)
374
+ web_modules/
375
+
376
+ # TypeScript cache
377
+ *.tsbuildinfo
378
+
379
+ # Optional npm cache directory
380
+ .npm
381
+
382
+ # Optional eslint cache
383
+ .eslintcache
384
+
385
+ # Microbundle cache
386
+ .rpt2_cache/
387
+ .rts2_cache_cjs/
388
+ .rts2_cache_es/
389
+ .rts2_cache_umd/
390
+
391
+ # Optional REPL history
392
+ .node_repl_history
393
+
394
+ # Output of 'npm pack'
395
+ *.tgz
396
+
397
+ # Yarn Integrity file
398
+ .yarn-integrity
399
+
400
+ # dotenv environment variables file
401
+ .env
402
+ .env.test
403
+ .env.production
404
+
405
+ # parcel-bundler cache (https://parceljs.org/)
406
+ .cache
407
+ .parcel-cache
408
+
409
+ # Next.js build output
410
+ .next
411
+ out
412
+
413
+ # Nuxt.js build / generate output
414
+ .nuxt
415
+ dist
416
+
417
+ # Gatsby files
418
+ .cache/
419
+ # Comment in the public line in if your project uses Gatsby and not Next.js
420
+ # https://nextjs.org/blog/next-9-1#public-directory-support
421
+ # public
422
+
423
+ # vuepress build output
424
+ .vuepress/dist
425
+
426
+ # Serverless directories
427
+ .serverless/
428
+
429
+ # FuseBox cache
430
+ .fusebox/
431
+
432
+ # DynamoDB Local files
433
+ .dynamodb/
434
+
435
+ # TernJS port file
436
+ .tern-port
437
+
438
+ # Stores VSCode versions used for testing VSCode extensions
439
+ .vscode-test
440
+
441
+ # yarn v2
442
+ .yarn/cache
443
+ .yarn/unplugged
444
+ .yarn/build-state.yml
445
+ .yarn/install-state.gz
446
+ .pnp.*
447
+
448
+ ### Node Patch ###
449
+ # Serverless Webpack directories
450
+ .webpack/
451
+
452
+ # Optional stylelint cache
453
+ .stylelintcache
454
+
455
+ # SvelteKit build / generate output
456
+ .svelte-kit
457
+
458
+ # End of https://www.toptal.com/developers/gitignore/api/node
package/.eslintrc.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
- "extends": ["plugin:react/recommended", "@willbooster/eslint-config-js"],
3
- "plugins": ["react", "react-hooks"],
2
+ "extends": ["plugin:react/recommended", "plugin:react-hooks/recommended", "@willbooster/eslint-config-js"],
4
3
  "rules": {
5
- "react/prop-types": "off",
6
- "react-hooks/rules-of-hooks": "error",
7
- "react-hooks/exhaustive-deps": "warn"
4
+ "react/jsx-sort-props": [
5
+ "error",
6
+ {
7
+ "callbacksLast": true,
8
+ "shorthandFirst": true,
9
+ "reservedFirst": true
10
+ }
11
+ ],
12
+ "react/prop-types": "off"
8
13
  },
9
14
  "settings": {
10
15
  "import/core-modules": ["react-dom"],
package/.lintstagedrc.cjs CHANGED
@@ -1,7 +1,13 @@
1
1
  const path = require('path');
2
+ const micromatch = require('micromatch');
2
3
 
3
4
  module.exports = {
5
+ './{src,__tests__}/**/*.{cjs,js,jsx,mjs,ts,tsx}': [
6
+ 'eslint --fix --rule "{ react-hooks/exhaustive-deps: 0 }"',
7
+ 'prettier --write',
8
+ ],
4
9
  './**/*.{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}');
5
11
  const filteredFiles = files
6
12
  .filter((file) => !file.includes('/test-fixtures/'))
7
13
  .map((file) => path.relative('', file));
@@ -0,0 +1,11 @@
1
+ /* eslint-env node */
2
+
3
+ const child_process = require('child_process');
4
+
5
+ const React = require('react');
6
+ const { useImmer } = require('use-immer');
7
+
8
+ child_process.exec('echo 0');
9
+ console.log(useImmer);
10
+
11
+ console.log(<div>テスト</div>);
package/package.json CHANGED
@@ -1,22 +1,37 @@
1
1
  {
2
2
  "name": "@willbooster/eslint-config-js-react",
3
- "version": "6.5.0",
3
+ "version": "6.5.1",
4
4
  "description": "A ESLint config for JavaScript projects using React",
5
5
  "license": "Apache-2.0",
6
6
  "author": "WillBooster Inc.",
7
7
  "main": ".eslintrc.json",
8
8
  "scripts": {
9
- "cleanup": "yarn format",
9
+ "cleanup": "yarn format && yarn lint-fix",
10
10
  "format": "sort-package-json && yarn prettify",
11
- "prettify": "prettier --color --write \"**/{.*/,}*.{cjs,css,htm,html,js,json,json5,jsx,md,mjs,scss,ts,tsx,vue,yaml,yml}\" \"!**/test-fixtures/**\""
11
+ "lint": "eslint --color \"./{src,__tests__}/**/*.{cjs,js,jsx,mjs,ts,tsx}\"",
12
+ "lint-fix": "yarn lint --fix --rule \"{ react-hooks/exhaustive-deps: 0 }\"",
13
+ "prettify": "prettier --color --write \"**/{.*/,}*.{cjs,css,htm,html,js,json,json5,jsx,md,mjs,scss,ts,tsx,vue,yaml,yml}\" \"!**/test-fixtures/**\"",
14
+ "test": "yarn lint"
12
15
  },
13
16
  "prettier": "@willbooster/prettier-config",
14
17
  "dependencies": {
15
- "@willbooster/eslint-config-js": "^6.5.0"
18
+ "@willbooster/eslint-config-js": "^6.5.1"
16
19
  },
17
20
  "devDependencies": {
18
- "@willbooster/prettier-config": "^6.5.0",
19
- "prettier": "2.4.1",
21
+ "@types/eslint": "8.2.2",
22
+ "@types/micromatch": "4.0.2",
23
+ "@types/react": "17.0.38",
24
+ "@willbooster/prettier-config": "^6.5.1",
25
+ "eslint": "8.6.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",
30
+ "eslint-plugin-sort-class-members": "1.14.1",
31
+ "eslint-plugin-sort-destructure-keys": "1.4.0",
32
+ "micromatch": "4.0.4",
33
+ "prettier": "2.5.1",
34
+ "react": "17.0.2",
20
35
  "sort-package-json": "1.53.1"
21
36
  },
22
37
  "peerDependencies": {
@@ -25,7 +40,9 @@
25
40
  "eslint-config-prettier": ">=8",
26
41
  "eslint-plugin-import": ">=2",
27
42
  "eslint-plugin-react": ">=7",
28
- "eslint-plugin-react-hooks": ">=2"
43
+ "eslint-plugin-react-hooks": ">=2",
44
+ "eslint-plugin-sort-class-members": ">=1.14",
45
+ "eslint-plugin-sort-destructure-keys": ">=1.4"
29
46
  },
30
- "gitHead": "e3e24949984b6a755a1fbacd9c6260c101ae9c9a"
47
+ "gitHead": "7161ca8d999b79f458268b8932e1c778ca60c7f9"
31
48
  }