Merge pull request #891 from h3poteto/prettier

Introduce prettier combinated eslint
This commit is contained in:
AkiraFukushima 2019-04-22 22:22:23 +09:00 committed by GitHub
commit 4ad335d4ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 19 deletions

View File

@ -9,13 +9,11 @@ module.exports = {
browser: true,
node: true
},
extends: 'standard',
extends: ['standard', 'prettier'],
globals: {
__static: true
},
plugins: [
'@typescript-eslint'
],
plugins: ['@typescript-eslint', 'prettier'],
rules: {
// allow paren-less arrow functions
'arrow-parens': 0,
@ -27,10 +25,11 @@ module.exports = {
'@typescript-eslint/no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_'
argsIgnorePattern: '^_'
}
],
'camelcase': 'off',
'@typescript-eslint/camelcase': 'off'
camelcase: 'off',
'@typescript-eslint/camelcase': 'off',
'space-before-function-paren': 'off'
}
}

6
.prettierrc Normal file
View File

@ -0,0 +1,6 @@
{
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"printWidth": 140
}

53
package-lock.json generated
View File

@ -2108,6 +2108,12 @@
"uniq": "^1.0.1"
}
},
"prettier": {
"version": "1.13.7",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz",
"integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==",
"dev": true
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
@ -7267,6 +7273,23 @@
}
}
},
"eslint-config-prettier": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-4.1.0.tgz",
"integrity": "sha512-zILwX9/Ocz4SV2vX7ox85AsrAgXV3f2o2gpIicdMIOra48WYqgUnWNH/cR/iHtmD2Vb3dLSC3LiEJnS05Gkw7w==",
"dev": true,
"requires": {
"get-stdin": "^6.0.0"
},
"dependencies": {
"get-stdin": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
"dev": true
}
}
},
"eslint-config-standard": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz",
@ -7511,6 +7534,15 @@
}
}
},
"eslint-plugin-prettier": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.1.tgz",
"integrity": "sha512-/PMttrarPAY78PLvV3xfWibMOdMDl57hmlQ2XqFeA37wd+CJ7WSxV7txqjVPHi/AAFKd2lX0ZqfsOc/i5yFCSQ==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0"
}
},
"eslint-plugin-promise": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz",
@ -8070,6 +8102,12 @@
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
},
"fast-diff": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
"integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
"dev": true
},
"fast-glob": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.4.tgz",
@ -15744,11 +15782,20 @@
"dev": true
},
"prettier": {
"version": "1.13.7",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz",
"integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==",
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz",
"integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==",
"dev": true
},
"prettier-linter-helpers": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
"integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
"dev": true,
"requires": {
"fast-diff": "^1.1.2"
}
},
"pretty-bytes": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",

View File

@ -208,12 +208,14 @@
"electron-ipc-mock": "0.0.3",
"electron-packager": "^12.2.0",
"eslint": "^5.9.0",
"eslint-config-prettier": "^4.1.0",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.1.1",
"eslint-plugin-html": "^4.0.6",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.2.2",
@ -234,6 +236,7 @@
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"node-sass": "^4.10.0",
"prettier": "^1.17.0",
"regenerator-runtime": "^0.13.1",
"sass-loader": "^7.0.3",
"style-loader": "^0.23.1",

View File

@ -11,15 +11,15 @@ import { RootState } from '@/store'
import { Notify } from '~/src/types/notify'
export interface AppState {
theme: ThemeColorType,
fontSize: number,
displayNameStyle: number,
notify: Notify,
timeFormat: number,
language: string,
defaultFonts: Array<string>,
ignoreCW: boolean,
ignoreNFSW: boolean,
theme: ThemeColorType
fontSize: number
displayNameStyle: number
notify: Notify
timeFormat: number
language: string
defaultFonts: Array<string>
ignoreCW: boolean
ignoreNFSW: boolean
hideAllAttachments: boolean
}