Skip to content

Commit 0ae7cec

Browse files
committed
style(code): standardjs
1 parent 0a98785 commit 0ae7cec

File tree

138 files changed

+33335
-26037
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+33335
-26037
lines changed

.eslintrc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"plugins": ["node"],
3-
"extends": ["eslint:recommended", "plugin:node/recommended"],
3+
"extends": ["standard", "plugin:node/recommended"],
44
"root": true,
55
"parserOptions": {
66
"ecmaVersion": 5
@@ -12,7 +12,7 @@
1212
"rules": {
1313
"node/exports-style": ["error", "module.exports"],
1414
"no-console": "off",
15-
// "new-cap": "error",
15+
// "new-cap": "error",
1616
"quotes": ["error", "single"],
1717
"curly": ["error", "multi-or-nest"],
1818
"complexity": ["error", 20],
@@ -32,4 +32,4 @@
3232
"io": 1,
3333
"d3": 1
3434
}
35-
}
35+
}

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
</h1>
44
<p align="center">
55
<a href="https://api.codacy.com/project/badge/Grade/7b3acb53c33b4a40bb32da109bbdd1a9"><img src="https://img.shields.io/codacy/grade/7b3acb53c33b4a40bb32da109bbdd1a9/develop.svg?style=flat-square" /></a>
6+
<a href="https://standarsjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square" /></a>
67
<img src="https://img.shields.io/circleci/token/ad7d2d066a75685a15c8e2fd08bd75e53b18fbb7/project/github/polonel/trudesk/develop.svg?style=flat-square" />
78
<a href="http://hits.dwyl.io/polonel/trudesk"><img src="http://hits.dwyl.io/polonel/trudesk.svg" /></a>
89
<a href="https://forum.trudesk.io"><img src="https://img.shields.io/discourse/https/forum.trudesk.io/topics.svg?style=flat-square" /></a>

package.json

+35-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"start": "node ./app",
1111
"build": "grunt build",
1212
"test": "mocha --recursive",
13+
"lint": "standard | snazzy",
1314
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha -- --recursive",
1415
"codacy": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --recursive -R spec && cat ./coverage/lcov.info | cross-env CODACY_PROJECT_TOKEN=65070aca43cc4fba96eaabd4033c9528 codacy-coverage && rm -rf ./coverage",
1516
"webpackwatch": "webpack --config webpack.config.js --watch",
@@ -105,13 +106,16 @@
105106
"babel-loader": "8.0.5",
106107
"chai": "*",
107108
"codacy-coverage": "^3.0.0",
108-
"css-loader": "2.1.0",
109109
"cross-env": "^5.2.0",
110+
"css-loader": "2.1.0",
110111
"eslint": "5.12.1",
111112
"eslint-config-angular": "0.5.0",
113+
"eslint-config-standard": "12.0.0",
112114
"eslint-plugin-angular": "4.0.0",
115+
"eslint-plugin-import": "2.14.0",
113116
"eslint-plugin-node": "8.0.1",
114117
"eslint-plugin-react": "7.12.4",
118+
"eslint-plugin-standard": "4.0.0",
115119
"exports-loader": "0.7.0",
116120
"expose-loader": "0.7.5",
117121
"grunt-contrib-watch": "1.1.0",
@@ -120,12 +124,16 @@
120124
"grunt-parallel": "0.5.1",
121125
"husky": "1.3.1",
122126
"istanbul": "0.4.5",
127+
"lint-staged": "8.1.0",
123128
"lorem-ipsum": "1.0.5",
124129
"mini-css-extract-plugin": "0.5.0",
125130
"mocha": "5.2.0",
126131
"mocha-lcov-reporter": "1.3.0",
132+
"prettier-standard": "9.1.1",
127133
"sass-loader": "7.1.0",
128134
"semantic-release": "15.13.3",
135+
"snazzy": "8.0.0",
136+
"standard": "12.0.1",
129137
"style-loader": "0.23.1",
130138
"superagent": "4.1.0",
131139
"supertest": "3.4.1",
@@ -147,14 +155,39 @@
147155
},
148156
"husky": {
149157
"hooks": {
150-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
158+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
159+
"pre-commit": "lint-staged"
151160
}
152161
},
162+
"lint-staged": {
163+
"*.js": [
164+
"prettier-standard",
165+
"git add"
166+
]
167+
},
153168
"commitlint": {
154169
"extends": [
155170
"@commitlint/config-conventional"
156171
]
157172
},
173+
"standard": {
174+
"ignore": [
175+
"/public/",
176+
"/mobile/",
177+
"/src/public/js/plugins/",
178+
"/src/public/js/vendor/"
179+
],
180+
"globals": [
181+
"angular",
182+
"define",
183+
"MG",
184+
"Snackbar",
185+
"ROLES",
186+
"io",
187+
"d3",
188+
"History"
189+
]
190+
},
158191
"config": {
159192
"blanket": {
160193
"pattern": "src",

0 commit comments

Comments
 (0)