diff --git a/.eslintrc.js b/.eslintrc.js index 317358cb..56e34ac5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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' } } diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..6692425b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "printWidth": 140 +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 23a93903..d48497af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 53884be9..756dcb5c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/renderer/store/App.ts b/src/renderer/store/App.ts index 04abbb74..c3a4d8c9 100644 --- a/src/renderer/store/App.ts +++ b/src/renderer/store/App.ts @@ -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, - ignoreCW: boolean, - ignoreNFSW: boolean, + theme: ThemeColorType + fontSize: number + displayNameStyle: number + notify: Notify + timeFormat: number + language: string + defaultFonts: Array + ignoreCW: boolean + ignoreNFSW: boolean hideAllAttachments: boolean }