mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
feat: added prettier (#921)
This commit is contained in:
parent
c3f5c972af
commit
43bd622e29
5 changed files with 39 additions and 7 deletions
|
@ -9,7 +9,8 @@
|
||||||
"google",
|
"google",
|
||||||
"plugin:react/recommended",
|
"plugin:react/recommended",
|
||||||
"plugin:flowtype/recommended",
|
"plugin:flowtype/recommended",
|
||||||
"plugin:jest/recommended"
|
"plugin:jest/recommended",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
],
|
],
|
||||||
"parser": "babel-eslint",
|
"parser": "babel-eslint",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
|
@ -30,6 +31,7 @@
|
||||||
"__APP_VERSION__": true
|
"__APP_VERSION__": true
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"prettier/prettier": ["error", null, "@prettier"],
|
||||||
"no-useless-escape": 2,
|
"no-useless-escape": 2,
|
||||||
"react/no-deprecated": 1,
|
"react/no-deprecated": 1,
|
||||||
"react/jsx-no-target-blank": 1,
|
"react/jsx-no-target-blank": 1,
|
||||||
|
|
12
.prettierrc
Normal file
12
.prettierrc
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"useTabs": false,
|
||||||
|
"printWidth": 160,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"singleQuote": true,
|
||||||
|
"requirePragma": true,
|
||||||
|
"bracketSpacing": false,
|
||||||
|
"jsxBracketSameLine": false,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"semi": true,
|
||||||
|
"parser": "flow"
|
||||||
|
}
|
21
package.json
21
package.json
|
@ -37,6 +37,7 @@
|
||||||
"js-string-escape": "1.0.1",
|
"js-string-escape": "1.0.1",
|
||||||
"js-yaml": "3.12.0",
|
"js-yaml": "3.12.0",
|
||||||
"jsonwebtoken": "8.3.0",
|
"jsonwebtoken": "8.3.0",
|
||||||
|
"lint-staged": "7.2.0",
|
||||||
"lockfile": "1.0.4",
|
"lockfile": "1.0.4",
|
||||||
"lodash": "4.17.10",
|
"lodash": "4.17.10",
|
||||||
"lunr": "0.7.0",
|
"lunr": "0.7.0",
|
||||||
|
@ -77,8 +78,8 @@
|
||||||
"babel-register": "6.26.0",
|
"babel-register": "6.26.0",
|
||||||
"babel-runtime": "6.26.0",
|
"babel-runtime": "6.26.0",
|
||||||
"bundlesize": "0.17.0",
|
"bundlesize": "0.17.0",
|
||||||
"cross-env": "5.1.4",
|
|
||||||
"codecov": "3.0.4",
|
"codecov": "3.0.4",
|
||||||
|
"cross-env": "5.1.4",
|
||||||
"css-loader": "0.28.10",
|
"css-loader": "0.28.10",
|
||||||
"element-react": "1.4.8",
|
"element-react": "1.4.8",
|
||||||
"element-theme-default": "1.4.13",
|
"element-theme-default": "1.4.13",
|
||||||
|
@ -86,11 +87,13 @@
|
||||||
"enzyme-adapter-react-16": "1.1.1",
|
"enzyme-adapter-react-16": "1.1.1",
|
||||||
"eslint": "5.2.0",
|
"eslint": "5.2.0",
|
||||||
"eslint-config-google": "0.9.1",
|
"eslint-config-google": "0.9.1",
|
||||||
"eslint-loader": "2.1.0",
|
"eslint-config-prettier": "2.9.0",
|
||||||
"eslint-plugin-babel": "5.1.0",
|
"eslint-loader": "2.0.0",
|
||||||
"eslint-plugin-flowtype": "2.50.0",
|
"eslint-plugin-babel": "4.1.2",
|
||||||
|
"eslint-plugin-flowtype": "2.49.3",
|
||||||
"eslint-plugin-import": "2.13.0",
|
"eslint-plugin-import": "2.13.0",
|
||||||
"eslint-plugin-jest": "21.18.0",
|
"eslint-plugin-jest": "21.18.0",
|
||||||
|
"eslint-plugin-prettier": "2.6.2",
|
||||||
"eslint-plugin-react": "7.10.0",
|
"eslint-plugin-react": "7.10.0",
|
||||||
"file-loader": "1.1.11",
|
"file-loader": "1.1.11",
|
||||||
"flow-bin": "0.77.0",
|
"flow-bin": "0.77.0",
|
||||||
|
@ -112,6 +115,7 @@
|
||||||
"normalize.css": "8.0.0",
|
"normalize.css": "8.0.0",
|
||||||
"optimize-css-assets-webpack-plugin": "5.0.0",
|
"optimize-css-assets-webpack-plugin": "5.0.0",
|
||||||
"ora": "1.4.0",
|
"ora": "1.4.0",
|
||||||
|
"prettier": "1.13.7",
|
||||||
"prop-types": "15.6.1",
|
"prop-types": "15.6.1",
|
||||||
"puppeteer": "1.1.1",
|
"puppeteer": "1.1.1",
|
||||||
"react": "16.2.0",
|
"react": "16.2.0",
|
||||||
|
@ -185,9 +189,16 @@
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "npm run lint"
|
"pre-commit": "lint-staged"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.js": [
|
||||||
|
"eslint .",
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
|
},
|
||||||
"bundlesize": [
|
"bundlesize": [
|
||||||
{
|
{
|
||||||
"path": "./static/vendor*.js",
|
"path": "./static/vendor*.js",
|
||||||
|
|
|
@ -10,7 +10,14 @@
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"require-jsdoc": 0,
|
"require-jsdoc": 0,
|
||||||
"no-console": 2,
|
"no-console": [
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
"allow": [
|
||||||
|
"log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"no-unused-vars": [
|
"no-unused-vars": [
|
||||||
2,
|
2,
|
||||||
{
|
{
|
||||||
|
|
BIN
yarn.lock
BIN
yarn.lock
Binary file not shown.
Loading…
Reference in a new issue