Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c159363

Browse files
christopherthielenmergify[bot]
authored andcommitted
refactor(lint): Migrate from tslint to eslint using npx tslint-to-eslint-config --prettier --comments **/*.ts
1 parent f52d49c commit c159363

File tree

3 files changed

+524
-8
lines changed

3 files changed

+524
-8
lines changed

‎.eslintrc.js‎

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
3+
https://github.com/typescript-eslint/tslint-to-eslint-config
4+
5+
It represents the closest reasonable ESLint configuration to this
6+
project's original TSLint configuration.
7+
8+
We recommend eventually switching this configuration to extend from
9+
the recommended rulesets in typescript-eslint.
10+
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
11+
12+
Happy linting! 💖
13+
*/
14+
module.exports = {
15+
env: {
16+
browser: true,
17+
},
18+
extends: ['prettier', 'prettier/@typescript-eslint'],
19+
parser: '@typescript-eslint/parser',
20+
parserOptions: {
21+
project: 'tsconfig.json',
22+
sourceType: 'module',
23+
},
24+
plugins: ['@typescript-eslint', '@typescript-eslint/tslint'],
25+
rules: {
26+
'@typescript-eslint/dot-notation': 'off',
27+
'@typescript-eslint/explicit-member-accessibility': [
28+
'off',
29+
{
30+
accessibility: 'explicit',
31+
},
32+
],
33+
'@typescript-eslint/member-ordering': 'error',
34+
'@typescript-eslint/no-empty-function': 'off',
35+
'@typescript-eslint/no-inferrable-types': 'error',
36+
'@typescript-eslint/no-unused-expressions': [
37+
'error',
38+
{
39+
allowShortCircuit: true,
40+
},
41+
],
42+
'@typescript-eslint/no-unused-vars': 'error',
43+
'@typescript-eslint/no-use-before-define': 'error',
44+
eqeqeq: ['error', 'smart'],
45+
'guard-for-in': 'error',
46+
'id-blacklist': [
47+
'error',
48+
'any',
49+
'Number',
50+
'number',
51+
'String',
52+
'string',
53+
'Boolean',
54+
'boolean',
55+
'Undefined',
56+
'undefined',
57+
],
58+
'id-match': 'error',
59+
'no-bitwise': 'error',
60+
'no-caller': 'error',
61+
'no-cond-assign': 'error',
62+
'no-debugger': 'error',
63+
'no-empty': 'off',
64+
'no-eval': 'error',
65+
'no-fallthrough': 'error',
66+
'no-new-wrappers': 'error',
67+
'no-redeclare': 'error',
68+
'no-shadow': [
69+
'error',
70+
{
71+
hoist: 'all',
72+
},
73+
],
74+
'no-trailing-spaces': 'error',
75+
'no-underscore-dangle': 'error',
76+
'no-unused-labels': 'error',
77+
'no-var': 'error',
78+
'prefer-const': [
79+
'error',
80+
{
81+
destructuring: 'all',
82+
},
83+
],
84+
radix: 'error',
85+
'spaced-comment': [
86+
'error',
87+
'always',
88+
{
89+
markers: ['/'],
90+
},
91+
],
92+
},
93+
};

‎package.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,16 @@
8484
"@types/angular-animate": "^1.5.10",
8585
"@types/angular-mocks": "^1.7.0",
8686
"@types/jest": "^26.0.5",
87+
"@typescript-eslint/eslint-plugin": "^3.7.0",
88+
"@typescript-eslint/eslint-plugin-tslint": "^3.7.0",
89+
"@typescript-eslint/parser": "^3.7.0",
8790
"@uirouter/publish-scripts": "2.5.3",
8891
"angular": "1.8.0",
8992
"bufferutil": "4.0.1",
9093
"canvas": "2.6.1",
9194
"dts-downlevel": "^0.4.0",
95+
"eslint": "^7.5.0",
96+
"eslint-config-prettier": "^6.11.0",
9297
"husky": "^4.2.5",
9398
"jest": "^26.0.1",
9499
"lodash": "^4.17.19",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /