File tree Expand file tree Collapse file tree 4 files changed +56
-31
lines changed
Expand file tree Collapse file tree 4 files changed +56
-31
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -173,7 +173,8 @@ serve: install
173173
174174upgrade :\
175175 .git/hooks/commit-msg\
176- upgrade-remove-husky
176+ upgrade-remove-husky\
177+ upgrade-eslint
177178 @# Upgrade target, depends on other upgrades
178179
179180
@@ -184,3 +185,17 @@ upgrade-remove-husky:
184185 && git commit -m" maint: @patternslib/dev upgrade - remove .husky directory in favor of git hooks." \
185186 || :
186187 -git config --unset core.hooksPath
188+
189+
190+ eslint.config.js upgrade-eslint :
191+ test -f " eslint.config.js" \
192+ || (\
193+ echo ' module.exports = require("@patternslib/dev/eslint.config.js");' > eslint.config.js\
194+ && git add eslint.config.js\
195+ && git commit -m" maint: @patternslib/dev upgrade - create eslint.config.js." \
196+ )
197+ test -f " .eslintrc.js" \
198+ && rm .eslintrc.js\
199+ && git add .eslintrc.js\
200+ && git commit -m" maint: @patternslib/dev upgrade - remove old .eslintrc.js." \
201+ || :
Original file line number Diff line number Diff line change 1+ const js = require ( "@eslint/js" ) ;
2+ const config_prettier = require ( "eslint-config-prettier" ) ;
3+ const globals = require ( "globals" ) ;
4+ const babel_parser = require ( "@babel/eslint-parser" ) ;
5+
6+ module . exports = [
7+ js . configs . recommended ,
8+ config_prettier ,
9+ {
10+ languageOptions : {
11+ ecmaVersion : 2022 ,
12+ globals : {
13+ ...globals . browser ,
14+ ...globals . node ,
15+ ...globals . jest ,
16+ } ,
17+ parser : babel_parser ,
18+ } ,
19+ ignores : [
20+ "cache/" ,
21+ "coverage/" ,
22+ "dist/" ,
23+ "node_modules/" ,
24+ "stats.json" ,
25+ "style/" ,
26+ ] ,
27+ rules : {
28+ "no-debugger" : 1 ,
29+ "no-duplicate-imports" : 1 ,
30+ // Do keep due avoid unintendet consequences.
31+ "no-alert" : 0 ,
32+ "no-control-regex" : 0 ,
33+ "no-self-assign" : 0 ,
34+ "no-useless-escape" : 0 ,
35+ } ,
36+ }
37+ ] ;
Original file line number Diff line number Diff line change 1212 "@release-it/conventional-changelog" : " ^10.0.0" ,
1313 "babel-loader" : " ^9.2.1" ,
1414 "css-loader" : " ^7.1.2" ,
15- "eslint" : " ^8.57.0" ,
16- "eslint-config-prettier" : " ^9.1.0" ,
15+ "eslint" : " ^9.20.1" ,
16+ "eslint-config-prettier" : " ^10.0.1" ,
17+ "globals" : " ^15.15.0" ,
1718 "identity-obj-proxy" : " ^3.0.0" ,
1819 "jest" : " ^29.7.0" ,
1920 "jest-environment-jsdom" : " ^29.7.0" ,
You can’t perform that action at this time.
0 commit comments