Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint-config): remove formatting rules #14

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ will get changed in the patch releases._

### ESLint

Our ESLint configurations does not include any formatting rules.
Please use a formatter like [Prettier](https://prettier.io/)
or add a formatting ruleset for ESLint like [ESLint Stylistic](https://eslint.style/).

#### TypeScript

Include the ESLint preset in your root `eslint.config.mjs`:
Expand Down Expand Up @@ -86,7 +90,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export const tsConfig = typescriptEslint.config({
extends: [...angularTypescriptConfig, prettier],
extends: [...angularTypescriptConfig],
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
Expand Down Expand Up @@ -115,7 +119,7 @@ export const tsConfig = typescriptEslint.config({
});

export const templateConfig = typescriptEslint.config({
extends: [...angularTemplateConfig, prettier],
extends: [...angularTemplateConfig],
files: ['**/*.html']
});

Expand Down
12 changes: 0 additions & 12 deletions eslint-config-angular/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ export const configBase = typescriptEslint.config({
'space-before-blocks': ['off'],

'@typescript-eslint/array-type': ['error'],
'@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@typescript-eslint/comma-dangle': ['error'],
'@typescript-eslint/comma-spacing': ['error'],
'@typescript-eslint/func-call-spacing': ['error'],
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
'@typescript-eslint/keyword-spacing': ['error'],
'@typescript-eslint/member-ordering': ['off'],
'@typescript-eslint/naming-convention': ['off'],
'@typescript-eslint/no-non-null-asserted-optional-chain': ['error'],
Expand All @@ -66,10 +60,6 @@ export const configBase = typescriptEslint.config({
{ vars: 'all', args: 'none', ignoreRestSiblings: false }
],
'@typescript-eslint/no-var-requires': ['error'],
'@typescript-eslint/space-infix-ops': ['error'],
'@typescript-eslint/space-before-blocks': ['error'],
'@typescript-eslint/type-annotation-spacing': ['error'],
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: true }],
Expand All @@ -93,7 +83,6 @@ export const configBase = typescriptEslint.config({
'no-multi-spaces': ['error'],
'no-multiple-empty-lines': ['error'],
'prefer-arrow/prefer-arrow-functions': ['off'],
'quote-props': ['error', 'consistent'],
'semi-spacing': ['error'],
'space-in-parens': ['error'],
'space-unary-ops': ['error'],
Expand Down Expand Up @@ -171,7 +160,6 @@ export const configRecommended = typescriptEslint.config({
}
],

'@typescript-eslint/no-extra-semi': ['error'],
'@typescript-eslint/no-for-in-array': ['error'],
'@typescript-eslint/no-implied-eval': ['error'],
'@typescript-eslint/no-loop-func': ['error'],
Expand Down
12 changes: 0 additions & 12 deletions eslint-config-typescript/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ export const configBase = typescriptEslint.config({
'space-before-blocks': ['off'],

'@typescript-eslint/array-type': ['error'],
'@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'@typescript-eslint/comma-dangle': ['error'],
'@typescript-eslint/comma-spacing': ['error'],
'@typescript-eslint/func-call-spacing': ['error'],
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
'@typescript-eslint/keyword-spacing': ['error'],
'@typescript-eslint/member-ordering': ['off'],
'@typescript-eslint/naming-convention': ['off'],
'@typescript-eslint/no-non-null-asserted-optional-chain': ['error'],
Expand All @@ -56,10 +50,6 @@ export const configBase = typescriptEslint.config({
{ vars: 'all', args: 'none', ignoreRestSiblings: false }
],
'@typescript-eslint/no-var-requires': ['error'],
'@typescript-eslint/space-infix-ops': ['error'],
'@typescript-eslint/space-before-blocks': ['error'],
'@typescript-eslint/type-annotation-spacing': ['error'],
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: true }],
Expand All @@ -83,7 +73,6 @@ export const configBase = typescriptEslint.config({
'no-multi-spaces': ['error'],
'no-multiple-empty-lines': ['error'],
'prefer-arrow/prefer-arrow-functions': ['off'],
'quote-props': ['error', 'consistent'],
'semi-spacing': ['error'],
'space-in-parens': ['error'],
'space-unary-ops': ['error'],
Expand Down Expand Up @@ -154,7 +143,6 @@ export const configRecommended = typescriptEslint.config({
}
],

'@typescript-eslint/no-extra-semi': ['error'],
'@typescript-eslint/no-for-in-array': ['error'],
'@typescript-eslint/no-implied-eval': ['error'],
'@typescript-eslint/no-loop-func': ['error'],
Expand Down
3 changes: 1 addition & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import path from 'path';
import { fileURLToPath } from 'url';
import typescriptEslint from 'typescript-eslint';
import angularTypescriptConfig from '@siemens/eslint-config-angular';
import prettier from 'eslint-config-prettier';
import tsdocPlugin from 'eslint-plugin-tsdoc';
import eslintPluginHeaders from 'eslint-plugin-headers';

Expand All @@ -32,7 +31,7 @@ export default [
},
...typescriptEslint.config({
name: 'typescript-eslint',
extends: [...angularTypescriptConfig, prettier],
extends: [...angularTypescriptConfig],
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
Expand Down
18 changes: 2 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"angular-eslint": "18.1.0",
"cpy-cli": "^5.0.0",
"eslint": "9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-headers": "^1.1.2",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsdoc": "50.2.2",
Expand Down