Skip to content

Commit

Permalink
comment out falsy rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel7373 committed Dec 19, 2024
1 parent 5fac126 commit cb84c09
Showing 1 changed file with 43 additions and 30 deletions.
73 changes: 43 additions & 30 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import stylistic from '@stylistic/eslint-plugin'
import html from '@html-eslint/eslint-plugin'
import angular from 'angular-eslint'
import htmlParser from '@html-eslint/parser'
import { createRegexForWords } from "./eslintHelper.mjs"
import { createRegexForWords } from './eslintHelper.mjs'

export default tsEslint.config(
{
Expand All @@ -16,14 +16,9 @@ export default tsEslint.config(
...tsEslint.configs.stylistic,
...angular.configs.tsRecommended,
],
languageOptions: {
parserOptions: {
project: [ "./tsconfig.json","./tsconfig.spec.json"],
}
},
processor: angular.processInlineTemplates,
rules: {
...stylistic.configs['all-flat'].rules,
...stylistic.configs['customize'].rules,
'unused-imports/no-unused-imports': 'error',

// ToDo: Disable rules so eslint passes, fix in followup ticket
Expand Down Expand Up @@ -53,15 +48,17 @@ export default tsEslint.config(
// '@stylistic/quotes': ['error', 'double'],
'@stylistic/padded-blocks': ['error', 'never'],
'@stylistic/dot-location': ['error', 'property'],
'@stylistic/newline-per-chained-call': ['error', { ignoreChainWithDepth: 1 }],
'@stylistic/indent': ['error', 2],
'@stylistic/quote-props': ['error', 'as-needed'],
'@stylistic/object-property-newline': ['error'],
'@stylistic/multiline-ternary': ['off'],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/array-bracket-newline': ['error', { minItems: 4 }],
'@stylistic/semi-style': ['error'],
'@stylistic/function-paren-newline': ['error', { minItems: 4 }],

// '@stylistic/array-bracket-newline': ['error', { minItems: 4 }],
'@stylistic/newline-per-chained-call': ['error', { ignoreChainWithDepth: 1 }],
// '@stylistic/object-property-newline': ['error'],

'@angular-eslint/directive-selector': [
'error',
{
Expand All @@ -79,26 +76,36 @@ export default tsEslint.config(
style: 'kebab-case',
},
],
"@typescript-eslint/naming-convention": ["error", {

selector: ["class", "interface"], format: ["PascalCase"]
}, {
selector: "variable", modifiers: [], format: ["camelCase", "UPPER_CASE"]
}, {
selector: "enum", format: ["PascalCase"]
}, {
selector: "enumMember", format: ["UPPER_CASE"]
}, {
selector: ["method", "function"], format: ["camelCase"]
}, {
selector: "typeParameter", format: ["PascalCase"]
}
'@typescript-eslint/naming-convention': [
'error',
{
selector: ['class', 'interface'],
format: ['PascalCase'],
},
{
selector: 'variable',
modifiers: [],
format: ['camelCase', 'UPPER_CASE'],
},
{
selector: 'enum',
format: ['PascalCase'],
},
{
selector: 'enumMember',
format: ['UPPER_CASE'],
},
{
selector: ['method', 'function'],
format: ['camelCase'],
},
{
selector: 'typeParameter',
format: ['PascalCase'],
},
],
"id-match": [
"error",
createRegexForWords(["KeyResult", "CheckIn", "TeamManagement", "StretchGoal"])
]
}
'id-match': ['error', createRegexForWords(['KeyResult', 'CheckIn', 'TeamManagement', 'StretchGoal'])],
},
},

{
Expand All @@ -124,7 +131,13 @@ export default tsEslint.config(
'@html-eslint/require-img-alt': 'off',
'@html-eslint/element-newline': 'off',
'@html-eslint/require-closing-tags': ['error', { selfClosing: 'always' }],
"@html-eslint/id-naming-convention": ["error", "regex", {pattern: `(?=(^[a-z]+(-[a-z]+)*$))(?=(${createRegexForWords(["KeyResult", "CheckIn", "TeamManagement", "StretchGoal"])}))`}],
'@html-eslint/id-naming-convention': [
'error',
'regex',
{
pattern: `(?=(^[a-z]+(-[a-z]+)*$))(?=(${createRegexForWords(['KeyResult', 'CheckIn', 'TeamManagement', 'StretchGoal'])}))`,
},
],
},
},
{
Expand Down

0 comments on commit cb84c09

Please sign in to comment.