eslintの仮構成
This commit is contained in:
parent
d3592f9fea
commit
c8c278653a
@ -105,6 +105,12 @@ jobs:
|
||||
command: yarn run stylelint
|
||||
when: always
|
||||
|
||||
# Run eslint
|
||||
- run:
|
||||
name: eslint
|
||||
command: yarn run eslint
|
||||
when: always
|
||||
|
||||
# Run unit test
|
||||
- run:
|
||||
command: |
|
||||
|
25
.eslintrc.js
vendored
Normal file
25
.eslintrc.js
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2020: true,
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:vue/essential",
|
||||
"plugin:prettier/recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier",
|
||||
"prettier/@typescript-eslint",
|
||||
"prettier/vue",
|
||||
],
|
||||
parser: "vue-eslint-parser",
|
||||
parserOptions: {
|
||||
ecmaVersion: 11,
|
||||
parser: "@typescript-eslint/parser",
|
||||
sourceType: "module",
|
||||
},
|
||||
plugins: ["prettier", "vue", "@typescript-eslint"],
|
||||
rules: {},
|
||||
};
|
12
package.json
12
package.json
@ -8,6 +8,7 @@
|
||||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"prod": "npm run production",
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"eslint": "eslint --ext .js,.ts,.vue resources/",
|
||||
"stylelint": "stylelint resources/assets/sass/**/*"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -16,11 +17,17 @@
|
||||
"@types/chart.js": "^2.7.1",
|
||||
"@types/jquery": "^3.3.38",
|
||||
"@types/js-cookie": "^2.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "^3.1.0",
|
||||
"@typescript-eslint/parser": "^3.1.0",
|
||||
"bootstrap": "^4.5.0",
|
||||
"cal-heatmap": "^3.3.10",
|
||||
"chart.js": "^2.7.1",
|
||||
"cross-env": "^5.2.0",
|
||||
"date-fns": "^1.30.1",
|
||||
"eslint": "^7.2.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-prettier": "^3.1.3",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"husky": "^1.3.1",
|
||||
"jquery": "^3.5.0",
|
||||
"js-cookie": "^2.2.0",
|
||||
@ -29,6 +36,7 @@
|
||||
"lint-staged": "^8.1.5",
|
||||
"open-iconic": "^1.1.1",
|
||||
"popper.js": "^1.14.7",
|
||||
"prettier": "^2.0.5",
|
||||
"resolve-url-loader": "^2.3.1",
|
||||
"sass": "^1.17.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
@ -54,6 +62,10 @@
|
||||
"stylelint --fix",
|
||||
"git add"
|
||||
],
|
||||
".{ts,js,vue}" : [
|
||||
"eslint --fix",
|
||||
"git add"
|
||||
],
|
||||
"*.php": [
|
||||
"composer fix",
|
||||
"git add"
|
||||
|
Loading…
Reference in New Issue
Block a user