Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(eslint): migrate tslint to eslint (DSP-1372) (#394)
* test(eslint): migrate from tslint to eslint * chore(eslint): two commands to run lint tool * refactor(eslint): automatically fixed errors by esLint rules * refactor(user): refactor code by following ESLint rules * refactor(user): refactor code by following ESLint rules * refactor(main): refactor code by following ESLint rules * refactor(user): refactor code by following ESLint rules * refactor(comments): undo ugly tODO comment but still following esLint rules * refactor(ontology): refactor code by following ESLint rules * refactor(ontology): refactor code by following ESLint rules * refactor(ontology-visualizer): refactor code by following ESLint rules * refactor(ontology): refactor code by following ESLint rules * refactor(permission): refactor code by following ESLint rules * refactor(system): refactor code by following ESLint rules * refactor(user): refactor code by following ESLint rules * refactor(main): refactor code by following ESLint rules * refactor(project): refactor code by following ESLint rules * refactor(system): refactor code by following ESLint rules * refactor(project): refactor code by following ESLint rules * refactor(user): refactor code by following ESLint rules * test(ontology): bug fix in res class form service * chore(gh-ci): use new eslint * docs(contribution): update linter section with new eslint config * refactor(tests): delete tslint * refactor(ontology): refactor code by following ESLint rules * fix(deps): delete tslint * refactor(eslint): delete empty tslint-to-eslint log file * fix(deps): reactivate eslint-plugin tslint * docs(contribution): update linter section with new eslint config * fix(eslint): reactivate old tslint config * fix(eslint): delete old tslint config rules * refactor(eslint): delete old tslint config files * chore(eslint): update eslint config * chore(eslint): update eslint config * refactor(ontology): fix eslint issue * refactor(cache): following our naming convention * test(eslint): update naming convention rules * refactor(eslint): delete unused config file * Update package-lock.json * refactor: refactor code by following our name conventions * chore(eslint): disallow console.log and .error * chore(deps): update package-lock.json * fix(eslint): bug fixing in eslint config * refactor: fixed errors from eslint * chore(eslint): update config * refactor: undo previous changes * fix(deps): update package-lock.json * refactor: refactor code to make eslint happy * refactor(eslint): delete redundant config * chore(deps): update package-lock.json * chore(eslint): fixed eslint issue automatically * chore(eslint): strict rule for spaces in objects Set eslint rule for https://docs.google.com/document/d/1SIVMxoV0N8xYqhVk_0hhuqSuUF47D1YYrDESqdmipfM/edit#heading=h.awf6ef8h98ze
- Loading branch information
1 parent
b4f101b
commit 6ffc3b6
Showing
105 changed files
with
3,581 additions
and
1,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Ignore miscellaneous folders | ||
.github/ | ||
.idea/ | ||
.vscode/ | ||
.yalc/ | ||
node_modules/ | ||
dist/ | ||
tmp/ | ||
|
||
# Ignore certain project files | ||
docs/assets/js/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
/* | ||
👋 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, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.eslint.json", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"eslint-plugin-import", | ||
"eslint-plugin-jsdoc", | ||
"@angular-eslint/eslint-plugin", | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"@angular-eslint/component-class-suffix": "error", | ||
"@angular-eslint/directive-class-suffix": "error", | ||
"@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", | ||
{ | ||
"selector": ["default"], | ||
"format": ["camelCase", "PascalCase", "UPPER_CASE"], | ||
"leadingUnderscore": "allow", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": ["classProperty", "classMethod"], | ||
"modifiers": ["private"], | ||
"format": ["camelCase"], | ||
"leadingUnderscore": "require" | ||
}, | ||
{ | ||
"selector": ["classProperty"], | ||
"modifiers": ["readonly"], | ||
"format": ["UPPER_CASE"], | ||
"trailingUnderscore": "allow" | ||
} | ||
], | ||
"@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/no-use-before-define": "error", | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/quotes": [ | ||
"error", | ||
"single", | ||
{ | ||
"avoidEscape": true | ||
} | ||
], | ||
"@typescript-eslint/semi": [ | ||
"error", | ||
"always" | ||
], | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"@typescript-eslint/unified-signatures": "error", | ||
"arrow-body-style": "error", | ||
"brace-style": [ | ||
"error", | ||
"1tbs" | ||
], | ||
"capitalized-comments": [ | ||
"error", | ||
"never" | ||
], | ||
"constructor-super": "error", | ||
"curly": "error", | ||
"object-curly-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"eol-last": "error", | ||
"eqeqeq": [ | ||
"error", | ||
"smart" | ||
], | ||
"guard-for-in": "error", | ||
"id-blacklist": "off", | ||
"id-match": "off", | ||
"import/no-deprecated": "warn", | ||
"jsdoc/no-types": "off", | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 200 | ||
} | ||
], | ||
"no-bitwise": "error", | ||
"no-caller": "error", | ||
"no-console": [ | ||
"warn", | ||
{ | ||
"allow": [ | ||
"dir", | ||
"timeLog", | ||
"assert", | ||
"clear", | ||
"count", | ||
"countReset", | ||
"group", | ||
"groupEnd", | ||
"table", | ||
"dirxml", | ||
"groupCollapsed", | ||
"Console", | ||
"profile", | ||
"profileEnd", | ||
"timeStamp", | ||
"context" | ||
] | ||
} | ||
], | ||
"no-debugger": "error", | ||
"no-empty": "off", | ||
"no-eval": "error", | ||
"no-fallthrough": "error", | ||
"no-new-wrappers": "error", | ||
"no-restricted-imports": [ | ||
"error", | ||
"rxjs/Rx" | ||
], | ||
"no-throw-literal": "error", | ||
"no-trailing-spaces": "error", | ||
"no-undef-init": "error", | ||
"no-underscore-dangle": "off", | ||
"no-unused-labels": "error", | ||
"no-var": "error", | ||
"prefer-const": "error", | ||
"radix": "error", | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
"markers": [ | ||
"/" | ||
] | ||
} | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.