Skip to content

Commit f43ab48

Browse files
authored
Add eslint command to yarn (CTFd#1324)
* Adds a `yarn lint` command that runs `eslint` * Starts work on CTFd#1245
1 parent 7f53b40 commit f43ab48

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"extends": "eslint:recommended",
7+
"globals": {
8+
"Atomics": "readonly",
9+
"SharedArrayBuffer": "readonly"
10+
},
11+
"parserOptions": {
12+
"ecmaVersion": 2018,
13+
"sourceType": "module"
14+
},
15+
"rules": {
16+
}
17+
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"dev": "node_modules/webpack-cli/bin/cli.js -w --mode=development",
1111
"build": "node_modules/webpack-cli/bin/cli.js --mode=development; node_modules/webpack-cli/bin/cli.js --mode=production",
1212
"verify": "node_modules/webpack-cli/bin/cli.js --mode=development --display=errors-only; node_modules/webpack-cli/bin/cli.js --mode=production --display=errors-only; git diff --quiet --exit-code",
13-
"clean": "rm -rf CTFd/themes/core/static/css/* CTFd/themes/core/static/js/* CTFd/themes/admin/static/css/* CTFd/themes/admin/static/js/*"
13+
"clean": "rm -rf CTFd/themes/core/static/css/* CTFd/themes/core/static/js/* CTFd/themes/admin/static/css/* CTFd/themes/admin/static/js/*",
14+
"lint": "node_modules/.bin/eslint CTFd/themes/core/assets/ CTFd/themes/admin/assets/"
1415
},
1516
"repository": {
1617
"type": "git",

0 commit comments

Comments
 (0)