eslintの仮構成

This commit is contained in:
hina 2020-06-06 17:37:01 +09:00
parent d3592f9fea
commit c8c278653a
No known key found for this signature in database
GPG Key ID: B666B2A137443F76
4 changed files with 666 additions and 7 deletions

View File

@ -105,6 +105,12 @@ jobs:
command: yarn run stylelint command: yarn run stylelint
when: always when: always
# Run eslint
- run:
name: eslint
command: yarn run eslint
when: always
# Run unit test # Run unit test
- run: - run:
command: | command: |

25
.eslintrc.js vendored Normal file
View 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: {},
};

View File

@ -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", "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", "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", "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/**/*" "stylelint": "stylelint resources/assets/sass/**/*"
}, },
"devDependencies": { "devDependencies": {
@ -16,11 +17,17 @@
"@types/chart.js": "^2.7.1", "@types/chart.js": "^2.7.1",
"@types/jquery": "^3.3.38", "@types/jquery": "^3.3.38",
"@types/js-cookie": "^2.2.0", "@types/js-cookie": "^2.2.0",
"@typescript-eslint/eslint-plugin": "^3.1.0",
"@typescript-eslint/parser": "^3.1.0",
"bootstrap": "^4.5.0", "bootstrap": "^4.5.0",
"cal-heatmap": "^3.3.10", "cal-heatmap": "^3.3.10",
"chart.js": "^2.7.1", "chart.js": "^2.7.1",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"date-fns": "^1.30.1", "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", "husky": "^1.3.1",
"jquery": "^3.5.0", "jquery": "^3.5.0",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
@ -29,6 +36,7 @@
"lint-staged": "^8.1.5", "lint-staged": "^8.1.5",
"open-iconic": "^1.1.1", "open-iconic": "^1.1.1",
"popper.js": "^1.14.7", "popper.js": "^1.14.7",
"prettier": "^2.0.5",
"resolve-url-loader": "^2.3.1", "resolve-url-loader": "^2.3.1",
"sass": "^1.17.0", "sass": "^1.17.0",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
@ -54,6 +62,10 @@
"stylelint --fix", "stylelint --fix",
"git add" "git add"
], ],
".{ts,js,vue}" : [
"eslint --fix",
"git add"
],
"*.php": [ "*.php": [
"composer fix", "composer fix",
"git add" "git add"

630
yarn.lock

File diff suppressed because it is too large Load Diff