Skip to content

Commit

Permalink
chore: Migrate to eslint (SAP#11214)
Browse files Browse the repository at this point in the history
Co-authored-by: Michał Gruca <pucek9@gmail.com>

Closes SAP#11237
  • Loading branch information
marlass authored Mar 1, 2021
1 parent 6c1b72b commit 018ec3d
Show file tree
Hide file tree
Showing 118 changed files with 1,235 additions and 491 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf

[*.md]
max_line_length = off
Expand Down
82 changes: 82 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"root": true,
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.eslint.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"plugins": ["deprecation"],
"rules": {
"@angular-eslint/no-host-metadata-property": "off",
"@typescript-eslint/no-empty-interface": "off",
"deprecation/deprecation": "warn",
"prefer-arrow/prefer-arrow-functions": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/naming-convention": "off",
"space-before-function-paren": "off",
"@angular-eslint/no-input-rename": "off",
"curly": "off",
"no-var": "off",
"@typescript-eslint/ban-types": "off",
"jsdoc/newline-after-description": "off",
"no-shadow": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/member-ordering": "off",
"arrow-body-style": "off",
"object-shorthand": "off",
"one-var": "off",
"@typescript-eslint/prefer-for-of": "off",
"jsdoc/no-types": "off",
"no-fallthrough": "off",
"prefer-const": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@angular-eslint/use-lifecycle-interface": "error",
"@typescript-eslint/quotes": "off",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "cx",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "cx",
"style": "camelCase"
}
],
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"id-blacklist": "off",
"id-match": "off",
"max-len": "off",
"linebreak-style": ["error", "unix"],
"no-underscore-dangle": "off"
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/no-negated-async": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"msjsdiag.debugger-for-chrome",
// Prettier - Code formatter
"esbenp.prettier-vscode",
// The ng lint command uses TSLint under the hood.
"ms-vscode.vscode-typescript-tslint-plugin",
// The ng lint command uses ESLint under the hood.
"dbaeumer.vscode-eslint",
// Modern CSS/SCSS/Less linter
"stylelint.vscode-stylelint"
]
Expand Down
Loading

0 comments on commit 018ec3d

Please sign in to comment.