Skip to content

Commit

Permalink
fix: Merge pull request #66 from Brightspace/gzolla/update-to-eslint9
Browse files Browse the repository at this point in the history
Update to eslint9
  • Loading branch information
GZolla authored Nov 1, 2024
2 parents bcd8fc0 + 7cfc7c3 commit 17186c2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

26 changes: 26 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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';

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/**/*']
})),
];
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
"author": "D2L Corporation",
"license": "Apache-2.0",
"scripts": {
"lint": "eslint . --ext .js,.html",
"lint": "eslint .",
"test": "npm run lint && npm run test:unit",
"test:unit": "d2l-test-runner"
},
"devDependencies": {
"@brightspace-ui/testing": "^1",
"@web/dev-server": "^0.4",
"eslint": "^8",
"eslint-config-brightspace": "^1",
"eslint": "^9",
"eslint-config-brightspace": "^1.2.1",
"@eslint/compat": "^1",
"@eslint/eslintrc": "^3",
"@eslint/js": "^9",
"sinon": "^19"
},
"version": "2.1.1",
Expand Down
3 changes: 0 additions & 3 deletions test/.eslintrc.json

This file was deleted.

0 comments on commit 17186c2

Please sign in to comment.