Use js format for eslint config

This commit is contained in:
redhoodsu
2018-06-16 18:25:09 +08:00
parent 12f82b6035
commit 29d9d75d39
5 changed files with 29 additions and 26 deletions

22
.eslintrc.js Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
worker: true
},
extends: 'eslint:recommended',
parserOptions: {
sourceType: 'module'
},
globals: {
VERSION: true,
ENV: true
},
rules: {
quotes: [
'error',
'single'
]
}
}

View File

@@ -1,22 +0,0 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"worker": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"globals": {
"VERSION": true,
"ENV": true
},
"rules": {
"quotes": [
"error",
"single"
]
}
}

View File

@@ -2,3 +2,6 @@ src/lib/util.js
src/lib/stringifyUtil.js src/lib/stringifyUtil.js
script/util.js script/util.js
test/util.js test/util.js
eruda.js
eruda.min.js
stringifyUtil.js

View File

@@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2016-2018 liriliri Copyright (c) 2016-present liriliri
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -10,8 +10,8 @@
"dev": "webpack-dev-server --config script/webpack.dev.js --host 0.0.0.0", "dev": "webpack-dev-server --config script/webpack.dev.js --host 0.0.0.0",
"test": "karma start", "test": "karma start",
"test:sauce": "karma start karma.sauce.js", "test:sauce": "karma start karma.sauce.js",
"format": "prettier eustia/*.js src/**/*.js src/*.js script/*.js test/*.js --write", "format": "prettier *.js eustia/*.js src/**/*.js src/*.js script/*.js test/*.js --write",
"lint": "eslint src", "lint": "eslint src/**/*.js",
"setup": "node script/cpTestLib", "setup": "node script/cpTestLib",
"genIcon": "node script/icomoon", "genIcon": "node script/icomoon",
"genUtilDoc": "eustia doc src/lib/util.js -f md -o doc/UTIL_API.md -t \"Eruda Util Documentation\"" "genUtilDoc": "eustia doc src/lib/util.js -f md -o doc/UTIL_API.md -t \"Eruda Util Documentation\""