Skip to content

Commit bbba04a

Browse files
committed
move eslint config out of package.json and add prettier
1 parent 5a17bef commit bbba04a

File tree

2 files changed

+60
-38
lines changed

2 files changed

+60
-38
lines changed

.eslintrc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"ignorePatterns": [
3+
"node_modules",
4+
"dist",
5+
"index.d.ts"
6+
],
7+
"extends": [
8+
"plugin:@typescript-eslint/eslint-recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"developit"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"sourceType": "module"
15+
},
16+
"env": {
17+
"browser": true,
18+
"mocha": true,
19+
"jest": false,
20+
"es6": true
21+
},
22+
"globals": {
23+
"expect": true
24+
},
25+
"rules": {
26+
"semi": [
27+
2,
28+
"always"
29+
],
30+
"brace-style": [
31+
2,
32+
"1tbs"
33+
],
34+
"quotes": [
35+
2,
36+
"single"
37+
],
38+
"lines-around-comment": [
39+
2,
40+
{
41+
"allowBlockStart": true,
42+
"allowObjectStart": true
43+
}
44+
],
45+
"jest/valid-expect": 0,
46+
"@typescript-eslint/no-explicit-any": 0,
47+
"@typescript-eslint/explicit-function-return-type": 0,
48+
"@typescript-eslint/explicit-module-boundary-types": 0,
49+
"@typescript-eslint/no-empty-function": 0,
50+
"@typescript-eslint/no-non-null-assertion": 0
51+
}
52+
}

package.json

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -54,57 +54,27 @@
5454
"test/*_test.ts"
5555
]
5656
},
57-
"eslintConfig": {
58-
"extends": [
59-
"developit",
60-
"plugin:@typescript-eslint/eslint-recommended",
61-
"plugin:@typescript-eslint/recommended"
62-
],
63-
"parser": "@typescript-eslint/parser",
64-
"parserOptions": {
65-
"sourceType": "module"
66-
},
67-
"env": {
68-
"browser": true,
69-
"mocha": true,
70-
"jest": false,
71-
"es6": true
57+
"prettier": {
58+
"singleQuote": true,
59+
"trailingComma": "none"
7260
},
73-
"globals": {
74-
"expect": true
75-
},
76-
"rules": {
77-
"semi": [
78-
2,
79-
"always"
80-
],
81-
"jest/valid-expect": 0,
82-
"@typescript-eslint/no-explicit-any": 0,
83-
"@typescript-eslint/explicit-function-return-type": 0,
84-
"@typescript-eslint/explicit-module-boundary-types": 0,
85-
"@typescript-eslint/no-empty-function": 0,
86-
"@typescript-eslint/no-non-null-assertion": 0
87-
}
88-
},
89-
"eslintIgnore": [
90-
"dist",
91-
"index.d.ts"
92-
],
9361
"devDependencies": {
9462
"@types/chai": "^4.2.11",
9563
"@types/mocha": "^7.0.2",
9664
"@types/sinon": "^9.0.4",
9765
"@types/sinon-chai": "^3.2.4",
98-
"@typescript-eslint/eslint-plugin": "^3.0.1",
99-
"@typescript-eslint/parser": "^3.0.1",
66+
"@typescript-eslint/eslint-plugin": "^5.61.0",
67+
"@typescript-eslint/parser": "^5.61.0",
10068
"chai": "^4.2.0",
10169
"documentation": "^14.0.2",
102-
"eslint": "^7.1.0",
70+
"eslint": "^7.32.0",
10371
"eslint-config-developit": "^1.2.0",
72+
"eslint-plugin-compat": "^4.1.4",
10473
"esm": "^3.2.25",
10574
"microbundle": "^0.12.3",
10675
"mocha": "^8.0.1",
10776
"npm-run-all": "^4.1.5",
77+
"prettier": "^2.8.8",
10878
"rimraf": "^3.0.2",
10979
"sinon": "^9.0.2",
11080
"sinon-chai": "^3.5.0",

0 commit comments

Comments
 (0)