Feature/switch to ESLint flat config format (#4203)
* Switch to ESLint flat config format * Update changelogpull/4204/head^2
parent
996f7f3f40
commit
75f34101b8
@ -1,151 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"ignorePatterns": ["**/*"],
|
|
||||||
"plugins": ["@nx"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
||||||
"rules": {
|
|
||||||
"@nx/enforce-module-boundaries": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"enforceBuildableLibDependency": true,
|
|
||||||
"allow": [],
|
|
||||||
"depConstraints": [
|
|
||||||
{
|
|
||||||
"sourceTag": "*",
|
|
||||||
"onlyDependOnLibsWithTags": ["*"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/no-extra-semi": "error",
|
|
||||||
"no-extra-semi": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx"],
|
|
||||||
"extends": ["plugin:@nx/typescript"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.js", "*.jsx"],
|
|
||||||
"extends": ["plugin:@nx/javascript"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.ts"],
|
|
||||||
"plugins": ["eslint-plugin-import", "@typescript-eslint"],
|
|
||||||
"extends": [
|
|
||||||
"plugin:@typescript-eslint/recommended-type-checked",
|
|
||||||
"plugin:@typescript-eslint/stylistic-type-checked"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
||||||
"@typescript-eslint/dot-notation": "off",
|
|
||||||
"@typescript-eslint/explicit-member-accessibility": [
|
|
||||||
"off",
|
|
||||||
{
|
|
||||||
"accessibility": "explicit"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/member-ordering": "warn",
|
|
||||||
"@typescript-eslint/naming-convention": [
|
|
||||||
"off",
|
|
||||||
{
|
|
||||||
"selector": "default",
|
|
||||||
"format": ["camelCase"],
|
|
||||||
"leadingUnderscore": "allow",
|
|
||||||
"trailingUnderscore": "allow"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"selector": ["variable", "classProperty", "typeProperty"],
|
|
||||||
"format": ["camelCase", "UPPER_CASE"],
|
|
||||||
"leadingUnderscore": "allow",
|
|
||||||
"trailingUnderscore": "allow"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"selector": "objectLiteralProperty",
|
|
||||||
"format": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"selector": "enumMember",
|
|
||||||
"format": ["camelCase", "UPPER_CASE", "PascalCase"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"selector": "typeLike",
|
|
||||||
"format": ["PascalCase"]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/no-empty-interface": "warn",
|
|
||||||
"@typescript-eslint/no-inferrable-types": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"ignoreParameters": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
||||||
"@typescript-eslint/no-shadow": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"hoist": "all"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/unified-signatures": "error",
|
|
||||||
"@typescript-eslint/no-loss-of-precision": "warn",
|
|
||||||
"@typescript-eslint/no-var-requires": "warn",
|
|
||||||
"@typescript-eslint/ban-types": "warn",
|
|
||||||
"arrow-body-style": "off",
|
|
||||||
"constructor-super": "error",
|
|
||||||
"eqeqeq": ["error", "smart"],
|
|
||||||
"guard-for-in": "warn",
|
|
||||||
"id-blacklist": "off",
|
|
||||||
"id-match": "off",
|
|
||||||
"import/no-deprecated": "warn",
|
|
||||||
"no-bitwise": "error",
|
|
||||||
"no-caller": "error",
|
|
||||||
"no-debugger": "error",
|
|
||||||
"no-empty": "off",
|
|
||||||
"no-eval": "error",
|
|
||||||
"no-fallthrough": "error",
|
|
||||||
"no-new-wrappers": "error",
|
|
||||||
"no-restricted-imports": ["error", "rxjs/Rx"],
|
|
||||||
"no-undef-init": "error",
|
|
||||||
"no-underscore-dangle": "off",
|
|
||||||
"no-var": "error",
|
|
||||||
"radix": "error",
|
|
||||||
"no-unsafe-optional-chaining": "warn",
|
|
||||||
"no-extra-boolean-cast": "warn",
|
|
||||||
"no-empty-pattern": "warn",
|
|
||||||
"no-useless-catch": "warn",
|
|
||||||
"no-unsafe-finally": "warn",
|
|
||||||
"no-prototype-builtins": "warn",
|
|
||||||
"no-async-promise-executor": "warn",
|
|
||||||
"no-constant-condition": "warn",
|
|
||||||
|
|
||||||
// The following rules are part of @typescript-eslint/recommended-type-checked
|
|
||||||
// and can be remove once solved
|
|
||||||
"@typescript-eslint/await-thenable": "warn",
|
|
||||||
"@typescript-eslint/ban-ts-comment": "warn",
|
|
||||||
"@typescript-eslint/no-base-to-string": "warn",
|
|
||||||
"@typescript-eslint/no-explicit-any": "warn",
|
|
||||||
"@typescript-eslint/no-floating-promises": "warn",
|
|
||||||
"@typescript-eslint/no-misused-promises": "warn",
|
|
||||||
"@typescript-eslint/no-redundant-type-constituents": "warn",
|
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-argument": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-return": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-call": "warn",
|
|
||||||
"@typescript-eslint/require-await": "warn",
|
|
||||||
"@typescript-eslint/restrict-template-expressions": "warn",
|
|
||||||
"@typescript-eslint/unbound-method": "warn",
|
|
||||||
|
|
||||||
// The following rules are part of @typescript-eslint/stylistic-type-checked
|
|
||||||
// and can be remove once solved
|
|
||||||
"@typescript-eslint/prefer-nullish-coalescing": "warn" // TODO: Requires strictNullChecks: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extends": ["plugin:storybook/recommended"]
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../.eslintrc.json",
|
|
||||||
"ignorePatterns": ["!**/*"],
|
|
||||||
"rules": {},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
||||||
"parserOptions": {
|
|
||||||
"project": ["apps/api/tsconfig.*?.json"]
|
|
||||||
},
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx"],
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.js", "*.jsx"],
|
|
||||||
"rules": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -0,0 +1,31 @@
|
|||||||
|
const baseConfig = require('../../eslint.config.cjs');
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
ignores: ['**/dist']
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
{
|
||||||
|
rules: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
project: ['apps/api/tsconfig.*?.json']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.js', '**/*.jsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
];
|
@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["../../.eslintrc.json"],
|
|
||||||
"ignorePatterns": ["!**/*"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
||||||
"parserOptions": {
|
|
||||||
"project": ["apps/client/tsconfig.*?.json"]
|
|
||||||
},
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx"],
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.js", "*.jsx"],
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.ts"],
|
|
||||||
"rules": {
|
|
||||||
"@angular-eslint/prefer-standalone": "off"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"plugins": ["@angular-eslint/eslint-plugin", "@typescript-eslint"],
|
|
||||||
"rules": {
|
|
||||||
"@angular-eslint/component-selector": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"type": "element",
|
|
||||||
"prefix": "gf",
|
|
||||||
"style": "kebab-case"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@angular-eslint/directive-selector": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"type": "attribute",
|
|
||||||
"prefix": "gf",
|
|
||||||
"style": "camelCase"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,62 @@
|
|||||||
|
const baseConfig = require('../../eslint.config.cjs');
|
||||||
|
const angularEslintPlugin = require('@angular-eslint/eslint-plugin');
|
||||||
|
const typescriptEslintPlugin = require('@typescript-eslint/eslint-plugin');
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
ignores: ['**/dist']
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
{
|
||||||
|
plugins: {
|
||||||
|
'@angular-eslint': angularEslintPlugin,
|
||||||
|
'@typescript-eslint': typescriptEslintPlugin
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
rules: {
|
||||||
|
'@angular-eslint/component-selector': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
type: 'element',
|
||||||
|
prefix: 'gf',
|
||||||
|
style: 'kebab-case'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@angular-eslint/directive-selector': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
type: 'attribute',
|
||||||
|
prefix: 'gf',
|
||||||
|
style: 'camelCase'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
project: ['apps/client/tsconfig.*?.json']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.js', '**/*.jsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.ts'],
|
||||||
|
rules: {
|
||||||
|
'@angular-eslint/prefer-standalone': 'off'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
|
|
||||||
"ignorePatterns": ["!**/*"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
||||||
"parserOptions": {
|
|
||||||
"project": ["apps/ui-e2e/tsconfig.json"]
|
|
||||||
},
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["src/plugins/index.js"],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/no-var-requires": "off",
|
|
||||||
"no-undef": "off"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -0,0 +1,33 @@
|
|||||||
|
const { FlatCompat } = require('@eslint/eslintrc');
|
||||||
|
const js = require('@eslint/js');
|
||||||
|
const baseConfig = require('../../eslint.config.cjs');
|
||||||
|
|
||||||
|
const compat = new FlatCompat({
|
||||||
|
baseDirectory: __dirname,
|
||||||
|
recommendedConfig: js.configs.recommended
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
ignores: ['**/dist']
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...compat.extends('plugin:cypress/recommended'),
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
project: ['apps/ui-e2e/tsconfig.json']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['src/plugins/index.js'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-var-requires': 'off',
|
||||||
|
'no-undef': 'off'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
@ -0,0 +1,196 @@
|
|||||||
|
const { FlatCompat } = require('@eslint/eslintrc');
|
||||||
|
const js = require('@eslint/js');
|
||||||
|
const nxEslintPlugin = require('@nx/eslint-plugin');
|
||||||
|
const storybook = require('eslint-plugin-storybook');
|
||||||
|
|
||||||
|
const compat = new FlatCompat({
|
||||||
|
baseDirectory: __dirname,
|
||||||
|
recommendedConfig: js.configs.recommended
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
ignores: ['**/dist']
|
||||||
|
},
|
||||||
|
...storybook.configs['flat/recommended'],
|
||||||
|
{ plugins: { '@nx': nxEslintPlugin } },
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
||||||
|
rules: {
|
||||||
|
'@nx/enforce-module-boundaries': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
enforceBuildableLibDependency: true,
|
||||||
|
allow: [],
|
||||||
|
depConstraints: [
|
||||||
|
{
|
||||||
|
sourceTag: '*',
|
||||||
|
onlyDependOnLibsWithTags: ['*']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@typescript-eslint/no-extra-semi': 'error',
|
||||||
|
'no-extra-semi': 'off'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
...compat
|
||||||
|
.config({
|
||||||
|
extends: ['plugin:@nx/typescript']
|
||||||
|
})
|
||||||
|
.map((config) => ({
|
||||||
|
...config,
|
||||||
|
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
|
||||||
|
rules: {
|
||||||
|
...config.rules
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
...compat
|
||||||
|
.config({
|
||||||
|
extends: ['plugin:@nx/javascript']
|
||||||
|
})
|
||||||
|
.map((config) => ({
|
||||||
|
...config,
|
||||||
|
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
|
||||||
|
rules: {
|
||||||
|
...config.rules
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
...compat
|
||||||
|
.config({
|
||||||
|
plugins: ['eslint-plugin-import', '@typescript-eslint'],
|
||||||
|
extends: [
|
||||||
|
'plugin:@typescript-eslint/recommended-type-checked',
|
||||||
|
'plugin:@typescript-eslint/stylistic-type-checked'
|
||||||
|
]
|
||||||
|
})
|
||||||
|
.map((config) => ({
|
||||||
|
...config,
|
||||||
|
files: ['**/*.ts'],
|
||||||
|
rules: {
|
||||||
|
...config.rules,
|
||||||
|
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
||||||
|
'@typescript-eslint/dot-notation': 'off',
|
||||||
|
'@typescript-eslint/explicit-member-accessibility': [
|
||||||
|
'off',
|
||||||
|
{
|
||||||
|
accessibility: 'explicit'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@typescript-eslint/member-ordering': 'warn',
|
||||||
|
'@typescript-eslint/naming-convention': [
|
||||||
|
'off',
|
||||||
|
{
|
||||||
|
selector: 'default',
|
||||||
|
format: ['camelCase'],
|
||||||
|
leadingUnderscore: 'allow',
|
||||||
|
trailingUnderscore: 'allow'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: ['variable', 'classProperty', 'typeProperty'],
|
||||||
|
format: ['camelCase', 'UPPER_CASE'],
|
||||||
|
leadingUnderscore: 'allow',
|
||||||
|
trailingUnderscore: 'allow'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: 'objectLiteralProperty',
|
||||||
|
format: null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: 'enumMember',
|
||||||
|
format: ['camelCase', 'UPPER_CASE', 'PascalCase']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
selector: 'typeLike',
|
||||||
|
format: ['PascalCase']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@typescript-eslint/no-empty-interface': 'warn',
|
||||||
|
'@typescript-eslint/no-inferrable-types': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
ignoreParameters: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@typescript-eslint/no-non-null-assertion': 'warn',
|
||||||
|
'@typescript-eslint/no-shadow': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
hoist: 'all'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@typescript-eslint/unified-signatures': 'error',
|
||||||
|
'@typescript-eslint/no-loss-of-precision': 'warn',
|
||||||
|
'@typescript-eslint/no-var-requires': 'warn',
|
||||||
|
'arrow-body-style': 'off',
|
||||||
|
'constructor-super': 'error',
|
||||||
|
eqeqeq: ['error', 'smart'],
|
||||||
|
'guard-for-in': 'warn',
|
||||||
|
'id-blacklist': 'off',
|
||||||
|
'id-match': 'off',
|
||||||
|
'import/no-deprecated': 'warn',
|
||||||
|
'no-bitwise': 'error',
|
||||||
|
'no-caller': 'error',
|
||||||
|
'no-debugger': 'error',
|
||||||
|
'no-empty': 'off',
|
||||||
|
'no-eval': 'error',
|
||||||
|
'no-fallthrough': 'error',
|
||||||
|
'no-new-wrappers': 'error',
|
||||||
|
'no-restricted-imports': ['error', 'rxjs/Rx'],
|
||||||
|
'no-undef-init': 'error',
|
||||||
|
'no-underscore-dangle': 'off',
|
||||||
|
'no-var': 'error',
|
||||||
|
radix: 'error',
|
||||||
|
'no-unsafe-optional-chaining': 'warn',
|
||||||
|
'no-extra-boolean-cast': 'warn',
|
||||||
|
'no-empty-pattern': 'warn',
|
||||||
|
'no-useless-catch': 'warn',
|
||||||
|
'no-unsafe-finally': 'warn',
|
||||||
|
'no-prototype-builtins': 'warn',
|
||||||
|
'no-async-promise-executor': 'warn',
|
||||||
|
'no-constant-condition': 'warn',
|
||||||
|
|
||||||
|
// The following rules are part of eslint:recommended
|
||||||
|
// and can be remove once solved
|
||||||
|
'no-constant-binary-expression': 'warn',
|
||||||
|
'no-loss-of-precision': 'warn',
|
||||||
|
|
||||||
|
// The following rules are part of @typescript-eslint/recommended-type-checked
|
||||||
|
// and can be remove once solved
|
||||||
|
'@typescript-eslint/await-thenable': 'warn',
|
||||||
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
||||||
|
'@typescript-eslint/no-base-to-string': 'warn',
|
||||||
|
'@typescript-eslint/no-empty-object-type': 'warn',
|
||||||
|
'@typescript-eslint/no-explicit-any': 'warn',
|
||||||
|
'@typescript-eslint/no-floating-promises': 'warn',
|
||||||
|
'@typescript-eslint/no-misused-promises': 'warn',
|
||||||
|
'@typescript-eslint/no-redundant-type-constituents': 'warn',
|
||||||
|
'@typescript-eslint/no-require-imports': 'warn',
|
||||||
|
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
||||||
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
||||||
|
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
||||||
|
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
|
||||||
|
'@typescript-eslint/no-unsafe-function-type': 'warn',
|
||||||
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
||||||
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
||||||
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
caughtErrors: 'none'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@typescript-eslint/no-wrapper-object-types': 'warn',
|
||||||
|
'@typescript-eslint/only-throw-error': 'warn',
|
||||||
|
'@typescript-eslint/prefer-promise-reject-errors': 'warn',
|
||||||
|
'@typescript-eslint/require-await': 'warn',
|
||||||
|
'@typescript-eslint/restrict-template-expressions': 'warn',
|
||||||
|
'@typescript-eslint/unbound-method': 'warn',
|
||||||
|
|
||||||
|
// The following rules are part of @typescript-eslint/stylistic-type-checked
|
||||||
|
// and can be remove once solved
|
||||||
|
'@typescript-eslint/prefer-nullish-coalescing': 'warn', // TODO: Requires strictNullChecks: true
|
||||||
|
'@typescript-eslint/prefer-regexp-exec': 'warn'
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
];
|
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["../../.eslintrc.json"],
|
|
||||||
"ignorePatterns": ["!**/*"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
||||||
"parserOptions": {
|
|
||||||
"project": ["libs/common/tsconfig.*?.json"]
|
|
||||||
},
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx"],
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.js", "*.jsx"],
|
|
||||||
"rules": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -0,0 +1,28 @@
|
|||||||
|
const baseConfig = require('../../eslint.config.cjs');
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
ignores: ['**/dist']
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
project: ['libs/common/tsconfig.*?.json']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['**/*.js', '**/*.jsx'],
|
||||||
|
// Override or add rules here
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
];
|
@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["../../.eslintrc.json"],
|
|
||||||
"ignorePatterns": ["!**/*", "**/*.stories.ts"],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
||||||
"parserOptions": {
|
|
||||||
"project": ["libs/ui/tsconfig.*?.json"]
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"plugin:@nx/angular",
|
|
||||||
"plugin:@angular-eslint/template/process-inline-templates"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@angular-eslint/directive-selector": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"type": "attribute",
|
|
||||||
"prefix": "gf",
|
|
||||||
"style": "camelCase"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@angular-eslint/component-selector": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"type": "element",
|
|
||||||
"prefix": "gf",
|
|
||||||
"style": "kebab-case"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@angular-eslint/prefer-standalone": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": ["*.html"],
|
|
||||||
"extends": ["plugin:@nx/angular-template"],
|
|
||||||
"rules": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -0,0 +1,65 @@
|
|||||||
|
const { FlatCompat } = require('@eslint/eslintrc');
|
||||||
|
const js = require('@eslint/js');
|
||||||
|
const baseConfig = require('../../eslint.config.cjs');
|
||||||
|
|
||||||
|
const compat = new FlatCompat({
|
||||||
|
baseDirectory: __dirname,
|
||||||
|
recommendedConfig: js.configs.recommended
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
ignores: ['**/dist']
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
...compat
|
||||||
|
.config({
|
||||||
|
extends: [
|
||||||
|
'plugin:@nx/angular',
|
||||||
|
'plugin:@angular-eslint/template/process-inline-templates'
|
||||||
|
]
|
||||||
|
})
|
||||||
|
.map((config) => ({
|
||||||
|
...config,
|
||||||
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
||||||
|
rules: {
|
||||||
|
...config.rules,
|
||||||
|
'@angular-eslint/directive-selector': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
type: 'attribute',
|
||||||
|
prefix: 'gf',
|
||||||
|
style: 'camelCase'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@angular-eslint/component-selector': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
type: 'element',
|
||||||
|
prefix: 'gf',
|
||||||
|
style: 'kebab-case'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@angular-eslint/prefer-standalone': 'off'
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
project: ['libs/ui/tsconfig.*?.json']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
...compat
|
||||||
|
.config({
|
||||||
|
extends: ['plugin:@nx/angular-template']
|
||||||
|
})
|
||||||
|
.map((config) => ({
|
||||||
|
...config,
|
||||||
|
files: ['**/*.html'],
|
||||||
|
rules: {
|
||||||
|
...config.rules
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
{
|
||||||
|
ignores: ['**/*.stories.ts']
|
||||||
|
}
|
||||||
|
];
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue