File tree 9 files changed +62
-22
lines changed
9 files changed +62
-22
lines changed Original file line number Diff line number Diff line change 62
62
command : npm version
63
63
- checkout
64
64
- run :
65
- name : Install @typescript-eslint/parser@4
65
+ name : Install eslint@7 and @typescript-eslint/parser@4
66
66
command : |
67
- npm install @typescript-eslint/parser@^4
67
+ npm install eslint@7 @typescript-eslint/parser@^4
68
68
- run :
69
69
name : Install dependencies
70
70
command : npm install
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ module . exports = {
4
+ parserOptions : {
5
+ sourceType : 'module'
6
+ }
7
+ }
Original file line number Diff line number Diff line change @@ -122,20 +122,16 @@ export default {
122
122
123
123
async mounted () {
124
124
// Load linter.
125
- const [{ default: Linter }, { default: coreRules }, { parseForESLint }] =
126
- await Promise .all ([
127
- import (' eslint4b/dist/linter' ),
128
- import (' eslint4b/dist/core-rules' ),
129
- import (' espree' ).then (() => import (' vue-eslint-parser' ))
130
- ])
125
+ const [{ Linter }, { parseForESLint }] = await Promise .all ([
126
+ import (' eslint/lib/linter' ),
127
+ import (' espree' ).then (() => import (' vue-eslint-parser' ))
128
+ ])
131
129
132
130
const linter = (this .linter = new Linter ())
133
131
134
132
for (const ruleId of Object .keys (rules)) {
135
133
linter .defineRule (` vue/${ ruleId} ` , rules[ruleId])
136
134
}
137
- linter .defineRule (' no-undef' , coreRules[' no-undef' ])
138
- linter .defineRule (' no-unused-vars' , coreRules[' no-unused-vars' ])
139
135
140
136
linter .defineParser (' vue-eslint-parser' , { parseForESLint })
141
137
}
Original file line number Diff line number Diff line change @@ -124,7 +124,15 @@ module.exports = {
124
124
resolve : {
125
125
alias : {
126
126
module : require . resolve ( './shim/module' ) ,
127
- eslint : path . resolve ( __dirname , './shim/eslint' )
127
+ eslint$ : require . resolve ( './shim/eslint' ) ,
128
+ esquery : path . resolve (
129
+ __dirname ,
130
+ '../../node_modules/esquery/dist/esquery.min.js'
131
+ ) ,
132
+ '@eslint/eslintrc/universal' : path . resolve (
133
+ __dirname ,
134
+ '../../node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs'
135
+ )
128
136
}
129
137
}
130
138
}
Original file line number Diff line number Diff line change
1
+ /* globals window */
2
+ export default (
3
+ // eslint-disable-next-line no-empty-pattern
4
+ {
5
+ // Vue, // the version of Vue being used in the VuePress app
6
+ // options, // the options for the root Vue instance
7
+ // router, // the router instance for the app
8
+ // siteData, // site metadata
9
+ }
10
+ ) => {
11
+ if ( typeof window !== 'undefined' ) {
12
+ if ( typeof window . process === 'undefined' ) {
13
+ window . process = new Proxy (
14
+ {
15
+ env : { } ,
16
+ cwd : ( ) => undefined
17
+ } ,
18
+ {
19
+ get ( target , name ) {
20
+ // For debug
21
+ // console.log(name)
22
+ return target [ name ]
23
+ }
24
+ }
25
+ )
26
+ }
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ const { Linter } = require ( 'eslint/lib/linter' )
2
+ module . exports = {
3
+ Linter
4
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 51
51
"node" : " >=8.10"
52
52
},
53
53
"peerDependencies" : {
54
- "eslint" : " ^6.2.0 || ^7.0.0 || ^8.0.0-0 "
54
+ "eslint" : " ^6.2.0 || ^7.0.0 || ^8.0.0"
55
55
},
56
56
"dependencies" : {
57
57
"eslint-utils" : " ^2.1.0" ,
60
60
"vue-eslint-parser" : " ^7.10.0"
61
61
},
62
62
"devDependencies" : {
63
- "@types/eslint" : " ^7.2.0 " ,
63
+ "@types/eslint" : " ^7.28.1 " ,
64
64
"@types/eslint-visitor-keys" : " ^1.0.0" ,
65
65
"@types/natural-compare" : " ^1.4.0" ,
66
66
"@types/node" : " ^13.13.5" ,
69
69
"@vuepress/plugin-pwa" : " ^1.4.1" ,
70
70
"acorn" : " ^8.5.0" ,
71
71
"env-cmd" : " ^10.1.0" ,
72
- "eslint" : " ^7 .0.0" ,
72
+ "eslint" : " ^8 .0.0" ,
73
73
"eslint-config-prettier" : " ^6.11.0" ,
74
74
"eslint-plugin-eslint-plugin" : " ^3.5.3" ,
75
75
"eslint-plugin-import" : " ^2.20.2" ,
76
76
"eslint-plugin-prettier" : " ^3.1.3" ,
77
77
"eslint-plugin-vue" : " file:." ,
78
- "eslint4b" : " ^7.0.0" ,
79
78
"espree" : " ^9.0.0" ,
80
- "lodash" : " ^4.17.15 " ,
79
+ "lodash" : " ^4.17.21 " ,
81
80
"mocha" : " ^7.1.2" ,
82
- "nyc" : " ^15.0.1 " ,
83
- "prettier" : " ^2.1 .1" ,
84
- "typescript" : " ^4.3.4 " ,
81
+ "nyc" : " ^15.1.0 " ,
82
+ "prettier" : " ^2.4 .1" ,
83
+ "typescript" : " ^4.4.3 " ,
85
84
"vue-eslint-editor" : " ^1.1.0" ,
86
- "vuepress" : " ^1.4.1 "
85
+ "vuepress" : " ^1.8.2 "
87
86
}
88
87
}
You can’t perform that action at this time.
0 commit comments