Skip to content

Commit

Permalink
fix: Use new shared configs (#178)
Browse files Browse the repository at this point in the history
* fix: Use new shared configs

* Remove unneeded dependencies
  • Loading branch information
GZolla authored Nov 26, 2024
1 parent f08a7e5 commit 9ba0574
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
42 changes: 17 additions & 25 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';
import { browserConfig, setDirectoryConfigs, testingConfig } from 'eslint-config-brightspace';
import globals from 'globals';
import js from '@eslint/js';
import path from 'node:path';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default [...compat.extends('brightspace/browser-config'), {
languageOptions: {
globals: {
...globals.node,
export default [
...setDirectoryConfigs(
browserConfig,
{
test: testingConfig
}
), {
languageOptions: {
globals: {
...globals.node,
},
},
},

rules: {
'no-empty': ['error', {
allowEmptyCatch: true,
}],
rules: {
'no-empty': ['error', {
allowEmptyCatch: true,
}],
},
},
},
...compat.extends('brightspace/testing-config').map(c => ({
...c,
files: ['test/**/*']
}))
];
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@
"chai": "^4",
"chai-as-promised": "^8",
"eslint": "^9",
"eslint-config-brightspace": "^1.2.1",
"eslint-plugin-html": "^8",
"eslint-plugin-import": "^2",
"eslint-plugin-sort-class-members": "^1",
"eslint-config-brightspace": "^2",
"mocha": "^10",
"sinon": "^19",
"sinon-chai": "^3"
Expand Down

0 comments on commit 9ba0574

Please sign in to comment.