mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
backend pretier, more linting rules
This commit is contained in:
parent
9dda50cfd8
commit
c69e5915f1
@ -1,20 +1,26 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
"extends": "standard",
|
env: {
|
||||||
"parser": "babel-eslint",
|
es6: true,
|
||||||
"env": {
|
node: true,
|
||||||
"es6": true,
|
'jest/globals': true
|
||||||
"node": true,
|
|
||||||
"jest/globals": true
|
|
||||||
},
|
},
|
||||||
"rules": {
|
parserOptions: {
|
||||||
"indent": [
|
parser: 'babel-eslint'
|
||||||
"error",
|
},
|
||||||
2
|
extends: [
|
||||||
],
|
'standard',
|
||||||
"quotes": [
|
'plugin:vue/recommended',
|
||||||
"error",
|
'plugin:prettier/recommended'
|
||||||
"single"
|
],
|
||||||
]
|
plugins: [
|
||||||
|
'jest'
|
||||||
|
]
|
||||||
|
rules: {
|
||||||
|
'indent': [ 'error', 2 ],
|
||||||
|
'quotes': [ "error", "single"],
|
||||||
|
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
|
'no-console': ['error'],
|
||||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
|
'prettier/prettier': ['error'],
|
||||||
},
|
},
|
||||||
"plugins": ["jest"]
|
|
||||||
};
|
};
|
||||||
|
|||||||
9
backend/.prettierrc.js
Normal file
9
backend/.prettierrc.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
module.exports = {
|
||||||
|
semi: false,
|
||||||
|
printWidth: 100,
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: "all",
|
||||||
|
tabWidth: 2,
|
||||||
|
bracketSpacing: true
|
||||||
|
};
|
||||||
@ -99,6 +99,7 @@
|
|||||||
"eslint-plugin-import": "~2.17.2",
|
"eslint-plugin-import": "~2.17.2",
|
||||||
"eslint-plugin-jest": "~22.5.1",
|
"eslint-plugin-jest": "~22.5.1",
|
||||||
"eslint-plugin-node": "~9.0.1",
|
"eslint-plugin-node": "~9.0.1",
|
||||||
|
"eslint-plugin-prettier": "~3.1.0",
|
||||||
"eslint-plugin-promise": "~4.1.1",
|
"eslint-plugin-promise": "~4.1.1",
|
||||||
"eslint-plugin-standard": "~4.0.0",
|
"eslint-plugin-standard": "~4.0.0",
|
||||||
"graphql-request": "~1.8.2",
|
"graphql-request": "~1.8.2",
|
||||||
|
|||||||
@ -8,6 +8,7 @@ module.exports = {
|
|||||||
parser: 'babel-eslint'
|
parser: 'babel-eslint'
|
||||||
},
|
},
|
||||||
extends: [
|
extends: [
|
||||||
|
'standard',
|
||||||
'plugin:vue/recommended',
|
'plugin:vue/recommended',
|
||||||
'plugin:prettier/recommended'
|
'plugin:prettier/recommended'
|
||||||
],
|
],
|
||||||
@ -18,7 +19,8 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
// add your custom rules here
|
// add your custom rules here
|
||||||
rules: {
|
rules: {
|
||||||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
//'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
|
'no-console': ['error'],
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
|
||||||
'prettier/prettier': ['error'],
|
'prettier/prettier': ['error'],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user