mirror of
https://github.com/danbulant/docker-compose
synced 2026-05-24 12:35:32 +00:00
style: use prettier + typescript-eslint
This commit is contained in:
parent
f85e6885dd
commit
bdbfc17de1
6 changed files with 328 additions and 573 deletions
18
.eslintrc.js
Normal file
18
.eslintrc.js
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:jest/recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'prettier/@typescript-eslint',
|
||||||
|
'plugin:prettier/recommended'
|
||||||
|
],
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
mocha: true,
|
||||||
|
es6: true
|
||||||
|
},
|
||||||
|
plugins: ['@typescript-eslint', 'prettier'],
|
||||||
|
parserOptions: {
|
||||||
|
parser: '@typescript-eslint/parser'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
"extends": [
|
|
||||||
"es/2015/server",
|
|
||||||
"plugin:jest/recommended",
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
|
||||||
"project": "./tsconfig.json"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"no-console" :"off",
|
|
||||||
"@typescript-eslint/indent": "off",
|
|
||||||
"@typescript-eslint/interface-name-prefix": "off",
|
|
||||||
"indent": [
|
|
||||||
"warn",
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"SwitchCase": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": [
|
|
||||||
"jest",
|
|
||||||
"@typescript-eslint"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"jest/globals": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
12
.prettierrc.js
Normal file
12
.prettierrc.js
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
module.exports = {
|
||||||
|
printWidth: 80,
|
||||||
|
tabWidth: 2,
|
||||||
|
singleQuote: true,
|
||||||
|
quoteProps: 'as-needed',
|
||||||
|
trailingComma: 'none',
|
||||||
|
bracketSpacing: true,
|
||||||
|
semi: false,
|
||||||
|
useTabs: false,
|
||||||
|
jsxBracketSameLine: false,
|
||||||
|
proseWrap: 'never'
|
||||||
|
}
|
||||||
13
.vscode/settings.json
vendored
Normal file
13
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
|
"[json]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
|
"[javascript]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -84,11 +84,14 @@
|
||||||
"@typescript-eslint/parser": "^4.21.0",
|
"@typescript-eslint/parser": "^4.21.0",
|
||||||
"dockerode": "^3.2.1",
|
"dockerode": "^3.2.1",
|
||||||
"eslint": "^7.24.0",
|
"eslint": "^7.24.0",
|
||||||
"eslint-config-es": "^3.28.25",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-plugin-extended": "^0.2.0",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
"eslint-plugin-jest": "^24.3.4",
|
"eslint-plugin-jest": "^24.3.4",
|
||||||
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
|
"eslint-watch": "^7.0.0",
|
||||||
"husky": "^6.0.0",
|
"husky": "^6.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
|
"prettier": "^2.2.1",
|
||||||
"standard-version": "^9.2.0",
|
"standard-version": "^9.2.0",
|
||||||
"ts-jest": "^26.5.4",
|
"ts-jest": "^26.5.4",
|
||||||
"typescript": "^4.2.4"
|
"typescript": "^4.2.4"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue