Skip to content

Commit 3a59f9f

Browse files
committed
feat: add prettier support
1 parent 35cbea0 commit 3a59f9f

File tree

4 files changed

+38
-19
lines changed

4 files changed

+38
-19
lines changed

.eslintrc.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
module.exports = {
2-
parser: '@typescript-eslint/parser',
3-
extends: [
4-
'eslint:recommended',
5-
'plugin:@typescript-eslint/recommended',
6-
],
7-
plugins: [
8-
'@typescript-eslint/eslint-plugin'
9-
],
10-
rules: {
11-
'@typescript-eslint/interface-name-prefix': 'off',
12-
'@typescript-eslint/explicit-function-return-type': 'off',
13-
'@typescript-eslint/explicit-module-boundary-types': 'off',
14-
'@typescript-eslint/no-explicit-any': 'off',
15-
},
16-
};
2+
parser: "@typescript-eslint/parser",
3+
extends: [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/recommended",
6+
"prettier"
7+
],
8+
plugins: ["@typescript-eslint/eslint-plugin"],
9+
rules: {
10+
"@typescript-eslint/array-type": "error",
11+
"@typescript-eslint/no-explicit-any": "warn",
12+
"@typescript-eslint/no-empty-interface": "error",
13+
"@typescript-eslint/no-implicit-any-catch": "error",
14+
"@typescript-eslint/no-import-type-side-effects": "error",
15+
"@typescript-eslint/promise-function-async": "error",
16+
"@typescript-eslint/strict-boolean-expressions": "error"
17+
}
18+
};

.prettierrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
tabWidth: 2,
3+
semi: true,
4+
singleQuote: false,
5+
trailingComma: "none",
6+
bracketSpacing: true,
7+
arrowParens: true,
8+
endOfLine: "lf",
9+
arrowParens: "avoid"
10+
};

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
const eslintrc = require('./.eslintrc.js');
1+
const eslintrc = require('./.eslintrc.js')
2+
const prettierrc = require('./.prettierrc.js')
23

3-
module.exports = eslintrc;
4+
module.exports = {
5+
eslintrc,
6+
prettierrc,
7+
}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121
"@typescript-eslint/eslint-plugin": "^5.59.5",
2222
"@typescript-eslint/parser": "^5.59.5",
2323
"eslint": "^8.40.0",
24-
"eslint-plugin-import": "^2.27.5"
24+
"eslint-config-prettier": "^8.8.0",
25+
"prettier": "^2.8.8"
2526
},
2627
"devDependencies": {
2728
"@commitlint/config-conventional": "^17.6.3",
2829
"@futura-dev/contributing-gen": "^2.0.14",
2930
"@futura-dev/cosmodrome": "^1.2.0",
30-
"commitlint": "^17.6.3"
31+
"commitlint": "^17.6.3",
32+
"eslint-config-prettier": "^8.8.0",
33+
"prettier": "^2.8.8"
3134
}
3235
}

0 commit comments

Comments
 (0)