Skip to content

Commit

Permalink
fix: Use new shared configs
Browse files Browse the repository at this point in the history
  • Loading branch information
GZolla authored Nov 26, 2024
2 parents b67dfcb + 65b1c47 commit ea80348
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
30 changes: 5 additions & 25 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import path from 'node:path';
import { addExtensions, browserConfig, setDirectoryConfigs, testingConfig } from 'eslint-config-brightspace';

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
});
const gitignorePath = path.resolve(__dirname, '.gitignore');

export default [
includeIgnoreFile(gitignorePath),
...compat.extends('brightspace/browser-config').map(c => ({
...c,
files:['**/*.js', '**/*.html']
})),
...compat.extends('brightspace/testing-config').map(c => ({
...c,
files:['test/**/*']
})),
];
export default addExtensions(setDirectoryConfigs(
browserConfig,
{ test: testingConfig }
), ['.js', '.html']);
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
"@brightspace-ui/testing": "^1",
"@web/dev-server": "^0.4",
"eslint": "^9",
"eslint-config-brightspace": "^1.2.1",
"@eslint/compat": "^1",
"@eslint/eslintrc": "^3",
"@eslint/js": "^9",
"eslint-config-brightspace": "^2",
"sinon": "^19"
},
"version": "2.1.2",
Expand Down

0 comments on commit ea80348

Please sign in to comment.