File tree 6 files changed +184
-646
lines changed
6 files changed +184
-646
lines changed Original file line number Diff line number Diff line change
1
+ /app /assets /config /manifest.js
2
+ /app /assets /javascript /** /vendor /* .js
3
+ /config /** /* .js
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ root : true ,
3
+ extends : [
4
+ 'standard'
5
+ ] ,
6
+ settings : {
7
+ 'import/resolver' : {
8
+ node : {
9
+ paths : [ 'app/javascript' ]
10
+ }
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ const ESLintPlugin = require ( 'eslint-webpack-plugin' )
1
2
const StyleLintPlugin = require ( 'stylelint-webpack-plugin' )
2
3
3
4
module . exports = {
4
5
envSpecificConfig : {
5
- module : {
6
- rules : [
7
- {
8
- test : / \. j s $ / ,
9
- exclude : / v e n d o r \/ .+ \. j s $ / ,
10
- loader : 'standard-loader' ,
11
- options : {
12
- globals : [
13
- '$'
14
- ]
15
- }
16
- }
17
- ]
18
- } ,
19
6
plugins : [
7
+ new ESLintPlugin ( {
8
+ failOnError : false ,
9
+ files : 'app/javascript/**/*.js' ,
10
+ exclude : 'app/javascript/**/vendor/*.js'
11
+ } ) ,
20
12
new StyleLintPlugin ( {
21
13
failOnError : false ,
22
14
files : 'app/javascript/**/*.(s(c|a)ss|css)'
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ namespace :yarn do
24
24
Rake ::Task [ 'yarn:run' ] . execute ( command : "stylelint #{ Dir . glob ( 'app/**/*.scss' ) . join ( ' ' ) } " )
25
25
end
26
26
27
- desc 'Run `bin/yarn standard `'
28
- task :standard do
29
- Rake ::Task [ 'yarn:run' ] . execute ( command : 'standard ' )
27
+ desc 'Run `bin/yarn eslint `'
28
+ task :eslint do
29
+ Rake ::Task [ 'yarn:run' ] . execute ( command : 'eslint app/**/*.js ' )
30
30
end
31
31
# rubocop:enable Rails/RakeEnvironment
32
32
end
33
33
34
34
task ( :lint ) . sources . push 'yarn:stylelint'
35
- task ( :lint ) . sources . push 'yarn:standard '
35
+ task ( :lint ) . sources . push 'yarn:eslint '
Original file line number Diff line number Diff line change 47
47
"@babel/eslint-parser" : " ^7.23.3" ,
48
48
"@types/express" : " ^4.17.21" ,
49
49
"@webpack-cli/serve" : " ^2.0.4" ,
50
- "eslint" : " ^8.56.0" ,
51
- "standard" : " ^16.0.3" ,
52
- "standard-loader" : " ^7.0.0" ,
50
+ "eslint" : " >=8.27.0" ,
51
+ "eslint-config-standard" : " ^17.1.0" ,
52
+ "eslint-plugin-import" : " ^2.29.1" ,
53
+ "eslint-plugin-n" : " ^16.5.0" ,
54
+ "eslint-plugin-promise" : " ^6.1.1" ,
55
+ "eslint-webpack-plugin" : " ^4.0.1" ,
53
56
"stylelint" : " ^15.11.0" ,
54
57
"stylelint-config-twbs-bootstrap" : " ^12.0.0" ,
55
58
"stylelint-order" : " ^6.0.4" ,
56
59
"stylelint-scss" : " ^5.3.2" ,
57
60
"stylelint-webpack-plugin" : " ^4.1.1" ,
58
61
"webpack-dev-server" : " ^4.15.1"
59
62
},
60
- "standard" : {
61
- "parser" : " @babel/eslint-parser" ,
62
- "ignore" : [
63
- " /*.js" ,
64
- " app/assets/javascripts" ,
65
- " app/javascript/src/vendor" ,
66
- " /config"
67
- ]
68
- },
69
63
"babel" : {
70
64
"presets" : [
71
65
" ./node_modules/shakapacker/package/babel/preset.js"
You can’t perform that action at this time.
0 commit comments