Skip to content
Snippets Groups Projects
Commit dc35c719 authored by François Grand's avatar François Grand
Browse files

migrate tslint to eslint

refs #500
parent c2675c9b
No related branches found
No related tags found
1 merge request!155Resolve "Update to the last version of Angular"
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config
It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.
We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
Happy linting! 💖
*/
module.exports = {
"env": {
"browser": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"eslint-plugin-import",
"@angular-eslint/eslint-plugin",
"@typescript-eslint",
"@typescript-eslint/tslint"
],
"root": true,
"rules": {
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "kebab-case"
}
],
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/no-host-metadata-property": "error",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/indent": "error",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/quotes": [
"error",
"double"
],
"@typescript-eslint/semi": [
"error",
"always"
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"arrow-body-style": "error",
"brace-style": [
"error",
"1tbs"
],
"constructor-super": "error",
"curly": "error",
"dot-notation": "off",
"eol-last": "error",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "off",
"id-denylist": "off",
"id-match": "off",
"import/no-deprecated": "warn",
"indent": "error",
"max-len": [
"error",
{
"code": 140
}
],
"no-bitwise": "error",
"no-caller": "error",
"no-console": [
"error",
{
"allow": [
"log",
"warn",
"dir",
"timeLog",
"assert",
"clear",
"count",
"countReset",
"group",
"groupEnd",
"table",
"dirxml",
"error",
"groupCollapsed",
"Console",
"profile",
"profileEnd",
"timeStamp",
"context"
]
}
],
"no-debugger": "error",
"no-empty": "off",
"no-empty-function": "off",
"no-eval": "error",
"no-fallthrough": "error",
"no-new-wrappers": "error",
"no-restricted-imports": [
"error",
"rxjs/Rx"
],
"no-shadow": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-var": "error",
"prefer-const": "error",
"quotes": "error",
"radix": "error",
"semi": "error",
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"@typescript-eslint/tslint/config": [
"error",
{
"rules": {
"import-spacing": true,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}
]
}
};
This diff is collapsed.
......@@ -10,7 +10,7 @@
"scripts": {
"ng": "cd . && \"node_modules/.bin/ng\"",
"postinstall": "./node_modules/.bin/webdriver-manager update --gecko=false --versions.chrome=83.0.4103.39",
"lint": "npm run ng -- lint",
"lint": "eslint -c .eslintrc.js --ext .ts src",
"e2e": "npm run preprocess && node scripts/check-translations.js && npm run ng -- e2e --suite=regular --webdriver-update=false",
"e2equick": "node scripts/check-translations.js && npm run ng -- e2e --dev-server-target= --suite=regular --webdriver-update=false",
"monkeytest": "npm run ng -- e2e --dev-server-target= --suite=monkeyTest --webdriver-update=false",
......@@ -86,6 +86,7 @@
},
"devDependencies": {
"@angular-devkit/core": "^14.0.4",
"@angular-eslint/eslint-plugin": "^14.0.0",
"@angular/cli": "^14.0.4",
"@angular/compiler-cli": "^14.0.4",
"@angular/language-service": "^14.0.4",
......@@ -94,16 +95,20 @@
"@types/jasmine": "~4.0.3",
"@types/jasminewd2": "^2.0.10",
"@types/node": "^18.0.1",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/eslint-plugin-tslint": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"codelyzer": "^6.0.2",
"cordova": "^10.0.0",
"electron": "^19.0.7",
"electron-builder": "^23.1.0",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.26.0",
"fs-extra": "^10.1.0",
"jasmine-core": "~4.2.0",
"jasmine-spec-reporter": "~7.0.0",
"protractor": "~7.0.0",
"ts-node": "^10.8.2",
"tslint": "^6.1.3",
"typescript": "~4.6.4",
"webpack-dev-server": "^3.11.0"
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment