Skip to content

Commit

Permalink
fix: lint problems
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvente committed Mar 13, 2024
1 parent 50bdf03 commit c6c934f
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ dist
docs
node_modules
src/analytics/segment.js
src/react/PluggableComponent
src/react/utils/contextFactory
28 changes: 26 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
const path = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies
const { getBaseConfig } = require('@openedx/frontend-build');

const config = getBaseConfig('eslint');

config.settings = {

Check failure on line 7 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / tests

Multiple spaces found before '{'
'import/resolver': {
webpack: {
config: path.resolve(__dirname, 'webpack.dev.config.js'),
},
alias: {
map: [
['@communications-app', '.'],
],
extensions: ['.ts', '.js', '.jsx', '.json'],
},
},
}

Check failure on line 19 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / tests

Missing semicolon
config.rules = {
'import/no-extraneous-dependencies': ['error', {
devDependencies: [
Expand All @@ -12,11 +26,12 @@ config.rules = {
'example/*',
],
}],
'import/prefer-default-export': 'off',
'import/extensions': ['error', {
ignore: ['@edx/frontend-platform*'],
ignore: ['@edx/frontend-platform*', '@openedx/frontend-build*'],
}],
'import/no-unresolved': ['error', {
ignore: ['@edx/frontend-platform*'],
ignore: ['@edx/frontend-platform*', '@openedx/frontend-build*'],
}],
'jsx-a11y/anchor-is-valid': ['error', {
components: ['Link'],
Expand All @@ -25,4 +40,13 @@ config.rules = {
}],
};

config.overrides = [
{
files: ['plugins/**/*.jsx'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
];

module.exports = config;
154 changes: 137 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"@testing-library/react-hooks": "^8.0.1",
"axios-mock-adapter": "^1.21.3",
"core-js": "3.36.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-webpack": "^0.13.8",
"eslint-plugin-import": "^2.29.1",
"husky": "8.0.3",
"jsdoc": "^4.0.0",
"nodemon": "3.1.0",
Expand Down

0 comments on commit c6c934f

Please sign in to comment.