Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0891f05

Browse filesBrowse files
committed
Revert "fix: require.resolve eslint parser"
This reverts commit 3a0caa6.
1 parent 3a0caa6 commit 0891f05
Copy full SHA for 0891f05

File tree

Expand file treeCollapse file tree

3 files changed

+2
-8
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+2
-8
lines changed

‎packages/@vue/cli-plugin-eslint/eslintOptions.js

Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-eslint/eslintOptions.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports.config = (api, preset, rootOptions = {}) => {
1414

1515
if (api.hasPlugin('babel') && !api.hasPlugin('typescript')) {
1616
config.parserOptions = {
17-
parser: makeJSOnlyValue(`require.resolve('babel-eslint')`)
17+
parser: 'babel-eslint'
1818
}
1919
}
2020

@@ -59,7 +59,6 @@ function makeJSOnlyValue (str) {
5959
fn.__expression = str
6060
return fn
6161
}
62-
exports.makeJSOnlyValue = makeJSOnlyValue
6362

6463
const baseExtensions = ['.js', '.jsx', '.vue']
6564
exports.extensions = api => api.hasPlugin('typescript')

‎packages/@vue/cli-plugin-eslint/generator/index.js

Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-eslint/generator/index.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module.exports.applyTS = api => {
9797
eslintConfig: {
9898
extends: ['@vue/typescript'],
9999
parserOptions: {
100-
parser: require('../eslintOptions').makeJSOnlyValue(`require.resolve('@typescript-eslint/parser')`)
100+
parser: '@typescript-eslint/parser'
101101
}
102102
},
103103
devDependencies: require('../eslintDeps').DEPS_MAP.typescript

‎packages/@vue/cli/lib/Generator.js

Copy file name to clipboardExpand all lines: packages/@vue/cli/lib/Generator.js
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,6 @@ module.exports = class Generator {
219219
// project-wide configuration even to dependencies.
220220
// TODO: this can be removed when Babel supports root: true in package.json
221221
extract('babel')
222-
223-
// Always extract .eslintrc.js as the parser needs to be require.resolve'ed
224-
// since ESLint doesn't resolve things from where it's declared
225-
// TODO: this can be removed when ESLint starts resolving things correctly
226-
extract('eslint')
227222
}
228223
}
229224

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.