barker/bookie/eslint.config.js

76 lines
1.8 KiB
JavaScript
Raw Permalink 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 pluginImport = require("eslint-plugin-import");
const unusedImports = require("eslint-plugin-unused-imports");
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,
import: pluginImport,
},
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"
}
],
"no-duplicate-imports" : "error",
"@typescript-eslint/no-explicit-any": [
"error"
],
"unusedImports/no-unused-imports": "error",
"@typescript-eslint/no-empty-function": "off",
"import/no-deprecated": "warn"
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
// ...angular.configs.templateAccessibility,
],
rules: {},
}
);