diff --git a/eslint.config.js b/eslint.config.js index 031cecc..047d8c2 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -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']); diff --git a/package.json b/package.json index d25dd1a..8fa8451 100644 --- a/package.json +++ b/package.json @@ -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",