Skip to content

Commit

Permalink
feat!: Upgrade eslint to v8
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Eslint was updated from v6 to v8. Since we have multiple apps depending on frontend-build, with this upgrade these apps could end up having linting issues.
  • Loading branch information
BilalQamar95 authored Jul 13, 2022
1 parent ecdea39 commit 0c03c44
Show file tree
Hide file tree
Showing 9 changed files with 2,037 additions and 2,977 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { createConfig } = require('./');
const { createConfig } = require('.');

module.exports = createConfig('eslint', {
rules: {
Expand Down
1 change: 0 additions & 1 deletion bin/fedx-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ switch (commandName) {
break;
case 'eslint':
ensureConfigOption(presets.eslint);
require('eslint/bin/eslint');
break;
case 'jest':
ensureConfigOption(presets.jest);
Expand Down
49 changes: 26 additions & 23 deletions config/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
module.exports = {
"extends": "@edx/eslint-config",
"parser": "babel-eslint",
"rules": {
"import/no-extraneous-dependencies": [
"error",
extends: '@edx/eslint-config',
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
},
rules: {
'import/no-extraneous-dependencies': [
'error',
{
"devDependencies": [
"**/*.config.*",
"**/*.test.*",
"**/setupTest.js",
devDependencies: [
'**/*.config.*',
'**/*.test.*',
'**/setupTest.js',
],
}
},
],
"import/no-unresolved": [
"error",
'import/no-unresolved': [
'error',
{
"ignore": [
"env.config"
]
}
ignore: [
'env.config',
],
},
],
// https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/340#issuecomment-338424908
"jsx-a11y/anchor-is-valid": [ "error", {
"components": [ "Link" ],
"specialLink": [ "to" ]
'jsx-a11y/anchor-is-valid': ['error', {
components: ['Link'],
specialLink: ['to'],
}],
},
"globals": {
"newrelic": false
}
}
globals: {
newrelic: false,
},
};
2 changes: 1 addition & 1 deletion config/webpack.dev-stage.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PostCssAutoprefixerPlugin = require('autoprefixer');
const PostCssRTLCSS = require('postcss-rtlcss');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');

const commonConfig = require('./webpack.common.config.js');
const commonConfig = require('./webpack.common.config');
const presets = require('../lib/presets');
const resolvePrivateEnvConfig = require('../lib/resolvePrivateEnvConfig');
const getLocalAliases = require('./getLocalAliases');
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PostCssAutoprefixerPlugin = require('autoprefixer');
const PostCssRTLCSS = require('postcss-rtlcss');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');

const commonConfig = require('./webpack.common.config.js');
const commonConfig = require('./webpack.common.config');
const presets = require('../lib/presets');
const resolvePrivateEnvConfig = require('../lib/resolvePrivateEnvConfig');
const getLocalAliases = require('./getLocalAliases');
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const PostCssAutoprefixerPlugin = require('autoprefixer');
const PostCssRTLCSS = require('postcss-rtlcss');

const HtmlWebpackNewRelicPlugin = require('../lib/plugins/html-webpack-new-relic-plugin');
const commonConfig = require('./webpack.common.config.js');
const commonConfig = require('./webpack.common.config');
const presets = require('../lib/presets');

// Add process env vars. Currently used only for setting the PUBLIC_PATH.
Expand Down
2 changes: 1 addition & 1 deletion example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const config = require('../config/.eslintrc.js');
const config = require('../config/.eslintrc');

module.exports = config;
Loading

0 comments on commit 0c03c44

Please sign in to comment.