brewman/overlord/eslint.config.js

75 lines
1.9 KiB
JavaScript
Raw Normal View History

// @ts-check
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
const eslintConfigPrettier = require("eslint-config-prettier");
// const plugin_import = require("eslint-plugin-import");
const unusedImports = require("eslint-plugin-unused-imports");
// const deprecation = require("eslint-plugin-deprecation");
module.exports = tseslint.config(
{
files: ["**/*.ts"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
eslintConfigPrettier
],
processor: angular.processInlineTemplates,
plugins: {
unusedImports: unusedImports,
},
rules: {
"@angular-eslint/directive-selector": [
"error",
{
type: "attribute",
prefix: "app",
style: "camelCase",
},
],
"@angular-eslint/component-selector": [
"error",
{
type: "element",
prefix: "app",
style: "kebab-case",
},
],
"@/lines-between-class-members": [
"error",
"always",
{
"exceptAfterSingleLine": true
}
],
// "import/order": [
// "error",
// {
// "alphabetize": {
// "order": "asc",
// "caseInsensitive": true
// },
// "newlines-between": "always"
// }
// ],
"@typescript-eslint/no-explicit-any": [
"error"
],
"unusedImports/no-unused-imports": "error",
"@typescript-eslint/no-empty-function": "off",
// "deprecation/deprecation": "warn"
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
// ...angular.configs.templateAccessibility,
],
rules: {},
}
);