Skip to content
Snippets Groups Projects
Commit de1e9910 authored by Mário Murín's avatar Mário Murín
Browse files

Revert eslint changes

parent b75cd9e2
No related branches found
No related tags found
No related merge requests found
{
"root": true,
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.*?.json"
],
"createDefaultProgram": true
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended"
],
"rules": {
"max-len": [
"error",
{
"code": 140,
"ignorePattern": "import .*"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"quotes": [
"error",
"single",
{
"allowTemplateLiterals": true
}
]
}
},
{
"files": [
"*.component.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"max-len": [
"error",
{
"code": 140
}
]
}
},
{
"files": [
"*.component.ts"
],
"extends": [
"plugin:@angular-eslint/template/process-inline-templates"
]
}
]
}
import typescriptEslint from "@typescript-eslint/eslint-plugin";
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 [...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
).map(config => ({
...config,
files: ["**/*.ts"],
})),
{
files: ["kypo-command-visualizations-example/**/*.ts"],
"@angular-eslint/directive-selector": ["error", {
type: "attribute",
prefix: "app-",
style: "camelCase",
}],
"@angular-eslint/component-selector": ["error", {
type: "element",
prefix: "app-",
style: "kebab-case",
}],
},
{
files: ["kypo-command-visualizations/**/*.ts"],
"@angular-eslint/directive-selector": ["error", {
type: "attribute",
prefix: "kypo-",
style: "camelCase",
}],
"@angular-eslint/component-selector": ["error", {
type: "element",
prefix: "kypo-",
style: "kebab-case",
}],
},
{
files: ["**/*.ts"],
plugins: {
"@typescript-eslint": typescriptEslint,
},
languageOptions: {
ecmaVersion: 5,
sourceType: "script",
parserOptions: {
project: ["tsconfig.*?.json"],
createDefaultProgram: true,
},
},
rules: {
"max-len": ["error", {
code: 140,
ignorePattern: "import .*",
}],
quotes: ["error", "single", {
allowTemplateLiterals: true,
}],
},
}, ...compat.extends("plugin:@angular-eslint/template/recommended").map(config => ({
...config,
files: ["**/*.component.html"],
})), {
files: ["**/*.component.html"],
rules: {
"max-len": ["error", {
code: 140,
}],
},
}, ...compat.extends("plugin:@angular-eslint/template/process-inline-templates").map(config => ({
...config,
files: ["**/*.component.ts"],
}))];
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment