Skip to content

Commit 68dc2e2

Browse files
committed
feat: use Prettier 2.0
1 parent ee087cb commit 68dc2e2

File tree

6 files changed

+696
-577
lines changed

6 files changed

+696
-577
lines changed

Diff for: .npmrc

Whitespace-only changes.

Diff for: index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ module.exports = {
183183
'prefer-object-spread': 'error',
184184
'quote-props': ['error', 'as-needed'],
185185
radix: 'off',
186-
'space-before-function-paren': ['error', { anonymous: 'never', named: 'never' }],
186+
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never' }],
187187
'use-isnan': 'error',
188188
'valid-typeof': 'off',
189189
'@typescript-eslint/tslint/config': [

Diff for: package.json

+19-19
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"name": "@angular-ru/eslint-config",
33
"version": "0.0.0",
44
"description": "Shared eslint rules",
5+
"keywords": [
6+
"eslint",
7+
"angular",
8+
"strict-eslint"
9+
],
510
"homepage": "https://github.com/Angular-RU/eslint-config#readme",
611
"bugs": {
712
"url": "https://github.com/Angular-RU/eslint-config/issues"
@@ -10,11 +15,6 @@
1015
"type": "git",
1116
"url": "git+https://github.com/Angular-RU/eslint-config.git"
1217
},
13-
"keywords": [
14-
"eslint",
15-
"angular",
16-
"strict-eslint"
17-
],
1818
"license": "MIT",
1919
"author": "splincode",
2020
"main": "index.js",
@@ -23,41 +23,41 @@
2323
"test": "sh test.sh"
2424
},
2525
"dependencies": {
26-
"@types/eslint": "6.1.8",
27-
"@typescript-eslint/eslint-plugin": "2.25.0",
28-
"@typescript-eslint/eslint-plugin-tslint": "2.25.0",
29-
"@typescript-eslint/parser": "2.25.0",
26+
"@types/eslint": "6.8.0",
27+
"@typescript-eslint/eslint-plugin": "2.27.0",
28+
"@typescript-eslint/eslint-plugin-tslint": "2.27.0",
29+
"@typescript-eslint/parser": "2.27.0",
3030
"codelyzer": "5.2.2",
3131
"es6-set": "0.1.5",
3232
"eslint-config-import": "0.13.0",
33-
"eslint-plugin-import": "2.20.1",
33+
"eslint-plugin-import": "2.20.2",
3434
"eslint-plugin-no-cyrillic-string": "1.0.4",
3535
"eslint-plugin-prettier": "3.1.2",
3636
"eslint-plugin-simple-import-sort": "5.0.2",
37-
"tslint": "6.1.0",
37+
"tslint": "6.1.1",
3838
"tslint-eslint-rules": "5.4.0",
3939
"tslint-sonarts": "1.9.0"
4040
},
4141
"devDependencies": {
4242
"@angular/compiler": "8.2.14",
4343
"@angular/core": "8.2.14",
44-
"@types/jest": "^25.1.4",
44+
"@types/jest": "25.2.1",
4545
"@types/node": "13.9.5",
4646
"eslint": "6.8.0",
47-
"jest": "^25.2.3",
48-
"npx": "^10.2.2",
49-
"prettier": "1.19.1",
50-
"sort-package-json": "1.40.0",
51-
"ts-jest": "^25.2.1",
52-
"ts-node": "8.8.1",
47+
"jest": "25.3.0",
48+
"npx": "10.2.2",
49+
"prettier": "2.0.4",
50+
"sort-package-json": "1.41.0",
51+
"ts-jest": "25.3.1",
52+
"ts-node": "8.8.2",
5353
"tslib": "1.11.1",
5454
"typescript": "3.8.3"
5555
},
5656
"peerDependencies": {
5757
"@angular/compiler": ">=8.0.0 <10.0.0",
5858
"@angular/core": ">=8.0.0 <10.0.0",
5959
"eslint": ">=6.8.0 < 8.0.0",
60-
"prettier": ">=1.19.1 < 3.0.0",
60+
"prettier": ">=2.0.0 < 3.0.0",
6161
"tslib": ">=1.11.1 < 2.0.0",
6262
"typescript": ">=3.5.1 < 4.0.0"
6363
}

Diff for: test/typescript.bad.ts

+23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
export class A {
2+
// expect errors
23
hello = 1;
34
}
45

6+
// expect errors
57
console.log(new A().hello);
8+
9+
// expect no errors
10+
const helloWorld: Function = function (): string {
11+
return 'Hello world';
12+
};
13+
14+
helloWorld();
15+
16+
// expect no errors
17+
const helloWorldAsync: Function = async function (): Promise<string> {
18+
return 'Hello world';
19+
};
20+
21+
await helloWorldAsync();
22+
23+
// expect no errors
24+
function helloWorldNamed(): string {
25+
return 'Hello world';
26+
}
27+
28+
helloWorldNamed();

Diff for: tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"resolveJsonModule": true,
1515
"esModuleInterop": true,
1616
"experimentalDecorators": true,
17-
"target": "es2015",
17+
"target": "es2017",
1818
"lib": ["es2017", "dom"],
1919
"paths": {},
2020
"module": "esnext",

0 commit comments

Comments
 (0)