mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Add prettier
This commit is contained in:
parent
c60e80d25b
commit
7d86af2b00
5 changed files with 72 additions and 6 deletions
|
@ -8,3 +8,20 @@ end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.{js,html}]
|
||||||
|
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_brace_style = 1TBS
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
max_line_length = 80
|
||||||
|
quote_type = auto
|
||||||
|
spaces_around_operators = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
{
|
{
|
||||||
"extends": "eslint:recommended",
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:meteor/recommended",
|
||||||
|
"prettier",
|
||||||
|
"prettier/standard"
|
||||||
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"es6": true,
|
"es6": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
"browser": true
|
"browser": true,
|
||||||
|
"meteor": true
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2017,
|
"ecmaVersion": 2017,
|
||||||
|
@ -28,11 +34,12 @@
|
||||||
"no-unneeded-ternary": 2,
|
"no-unneeded-ternary": 2,
|
||||||
"radix": 2,
|
"radix": 2,
|
||||||
"semi": [2, "always"],
|
"semi": [2, "always"],
|
||||||
"camelcase": [2, {"properties": "never"}],
|
"camelcase": [2, { "properties": "never" }],
|
||||||
"comma-spacing": 2,
|
"comma-spacing": 2,
|
||||||
"comma-style": 2,
|
"comma-style": 2,
|
||||||
"eol-last": 2,
|
"eol-last": 2,
|
||||||
"linebreak-style": [2, "unix"],
|
"linebreak-style": [2, "unix"],
|
||||||
|
"meteor/audit-argument-checks": 0,
|
||||||
"new-parens": 2,
|
"new-parens": 2,
|
||||||
"no-lonely-if": 2,
|
"no-lonely-if": 2,
|
||||||
"no-multiple-empty-lines": 2,
|
"no-multiple-empty-lines": 2,
|
||||||
|
@ -52,8 +59,26 @@
|
||||||
"prefer-const": 2,
|
"prefer-const": 2,
|
||||||
"prefer-spread": 2,
|
"prefer-spread": 2,
|
||||||
"prefer-template": 2,
|
"prefer-template": 2,
|
||||||
"no-unused-vars" : "warn"
|
"no-unused-vars": "warn",
|
||||||
|
"prettier/prettier": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"printWidth": 80,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "all"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
"settings": {
|
||||||
|
"import/resolver": {
|
||||||
|
"meteor": {
|
||||||
|
"extensions": [".js", ".jsx"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugins": ["prettier", "meteor"],
|
||||||
"globals": {
|
"globals": {
|
||||||
"Meteor": false,
|
"Meteor": false,
|
||||||
"Session": false,
|
"Session": false,
|
||||||
|
@ -100,7 +125,7 @@
|
||||||
"Attachments": true,
|
"Attachments": true,
|
||||||
"Boards": true,
|
"Boards": true,
|
||||||
"CardComments": true,
|
"CardComments": true,
|
||||||
"DatePicker" : true,
|
"DatePicker": true,
|
||||||
"Cards": true,
|
"Cards": true,
|
||||||
"CustomFields": true,
|
"CustomFields": true,
|
||||||
"Lists": true,
|
"Lists": true,
|
||||||
|
|
7
.prettierignore
Normal file
7
.prettierignore
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
packages/
|
||||||
|
node_modules/
|
||||||
|
.build/
|
||||||
|
.meteor/
|
||||||
|
.vscode/
|
||||||
|
.tx/
|
||||||
|
.github/
|
8
.prettierrc
Normal file
8
.prettierrc
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"printWidth": 80,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "all"
|
||||||
|
}
|
11
package.json
11
package.json
|
@ -5,6 +5,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ignore-pattern 'packages/*' .",
|
"lint": "eslint --ignore-pattern 'packages/*' .",
|
||||||
|
"prettify": "prettier --write '**/*.js' '**/*.jsx'",
|
||||||
"test": "npm run --silent lint"
|
"test": "npm run --silent lint"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
@ -20,7 +21,15 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://wekan.github.io",
|
"homepage": "https://wekan.github.io",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^5.16.0"
|
"eslint": "^5.16.0",
|
||||||
|
"eslint-config-meteor": "0.0.9",
|
||||||
|
"eslint-config-prettier": "^3.6.0",
|
||||||
|
"eslint-import-resolver-meteor": "^0.4.0",
|
||||||
|
"eslint-plugin-import": "^2.18.0",
|
||||||
|
"eslint-plugin-meteor": "^4.2.2",
|
||||||
|
"eslint-plugin-prettier": "^3.1.0",
|
||||||
|
"prettier": "^1.18.2",
|
||||||
|
"prettier-eslint": "^8.8.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.4.3",
|
"@babel/runtime": "^7.4.3",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue