diff --git a/eslint.config.js b/eslint.config.js index 215479f..f89ecb3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -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/**/*'] -})) ]; diff --git a/package.json b/package.json index b142761..18da909 100644 --- a/package.json +++ b/package.json @@ -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"