Skip to content

Commit

Permalink
Merge pull request #1664 from UMM-CSci-3601/update-eslint
Browse files Browse the repository at this point in the history
Update eslint
  • Loading branch information
kklamberty authored Jan 22, 2025
2 parents 6db8cf7 + 4614ca2 commit 512b7fe
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 101 deletions.
51 changes: 0 additions & 51 deletions client/.eslintrc.json

This file was deleted.

53 changes: 53 additions & 0 deletions client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

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 [{
ignores: ["projects/**/*"],
}, ...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
).map(config => ({
...config,
files: ["**/*.ts"],
})), {
files: ["**/*.ts"],

rules: {
"@angular-eslint/directive-selector": ["error", {
type: "attribute",
prefix: "app",
style: "camelCase",
}],

"@angular-eslint/component-selector": ["error", {
type: "element",
prefix: "app",
style: "kebab-case",
}],

"no-underscore-dangle": ["error", {
allow: ["_id"],
}],
},
}, ...compat.extends(
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility",
).map(config => ({
...config,
files: ["**/*.html"],
})), {
files: ["**/*.html"],
rules: {},
}];
Loading

0 comments on commit 512b7fe

Please sign in to comment.