-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade eslint & related packages #116
base: master
Are you sure you want to change the base?
Changes from all commits
be5cb97
a89c838
9a1a0ef
0a65f7d
eeae4a5
888bd39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ async function run (cwd, config) { | |
|
||
if (config.lint) { | ||
const eslintPath = getPathInHostNodeModules('eslint') | ||
const babelEslintPath = getPathInHostNodeModules('babel-eslint') | ||
const babelEslintPath = getPathInHostNodeModules('@babel/eslint-parser') | ||
|
||
const configs = { | ||
prettier: getPathInHostNodeModules('eslint-config-prettier'), | ||
|
@@ -122,6 +122,9 @@ async function run (cwd, config) { | |
const eslint = require(eslintPath) | ||
engine = new eslint.CLIEngine({ | ||
parser: babelEslintPath, | ||
parserOptions: { | ||
requireConfigFile: false | ||
}, | ||
Comment on lines
+125
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This solves the babel parsing error that throws for each file after upgrading to
|
||
resolvePluginsRelativeTo: path.join(__dirname, 'vendor'), | ||
baseConfig: { | ||
plugins: ['jest'], | ||
|
@@ -131,14 +134,7 @@ async function run (cwd, config) { | |
extends: [ | ||
getConfig('standard', 'index.js'), | ||
getConfig('standard-jsx', 'index.js'), | ||
getConfig('prettier', 'index.js'), | ||
getConfig('prettier', '@typescript-eslint.js'), | ||
getConfig('prettier', 'babel.js'), | ||
getConfig('prettier', 'flowtype.js'), | ||
getConfig('prettier', 'react.js'), | ||
getConfig('prettier', 'standard.js'), | ||
getConfig('prettier', 'unicorn.js'), | ||
getConfig('prettier', 'vue.js') | ||
Comment on lines
-134
to
-141
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This addresses the breaking changes from v8.0.0 of |
||
getConfig('prettier', 'index.js') | ||
] | ||
} | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"dependencies": { | ||
"babel-eslint": "^10.1.0", | ||
"eslint-config-prettier": "~6.11.0", | ||
"eslint-config-standard": "14.1.1", | ||
"eslint-config-standard-jsx": "8.1.0", | ||
"eslint-plugin-import": "~2.20.2", | ||
"eslint-plugin-jest": "~23.8.2", | ||
"@babel/eslint-parser": "^7.13.14", | ||
"eslint-config-prettier": "~8.1.0", | ||
"eslint-config-standard": "16.0.2", | ||
"eslint-config-standard-jsx": "10.0.0", | ||
"eslint-plugin-import": "~2.22.1", | ||
"eslint-plugin-jest": "~24.3.2", | ||
"eslint-plugin-node": "~11.1.0", | ||
"eslint-plugin-promise": "~4.2.1", | ||
"eslint-plugin-react": "~7.19.0", | ||
"eslint-plugin-standard": "~4.0.1" | ||
"eslint-plugin-promise": "~4.3.1", | ||
"eslint-plugin-react": "~7.23.1" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
babel-eslint
was deprecated 6 months ago