Nov 2, 2021
0
Level 6
Webpack ESLint Setups with Laravel Mix 6
eslint-loader is deprecated and we are recommended to use ESLint Webpack plugin. Was looking into tweaking settings to use the webpack plugin instead.
Do think I need to adjust my .eslintrc.json as I use vue.common.js and added acceptance for esm6. Also guess amd can go on this setup with Vue 2.6.14:
{
"env": {
"browser": true,
"es6": true,
"amd": true,
"jquery": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:vue/essential"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"Vue": true,
"EventBus": true,
"axios": true,
"_": true,
"tinymce": true,
"Vuex": true,
"preview": true
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"vue"
],
"rules": {
}
}
also may need to added the recommended eslint/plugin . Now only have
"eslint": "^8.1.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-vue": "^6.2.2",
But what is the best way to add ESLint using Laravel Mix using Webpack ESLint?
Should I add something like:
.webpackConfig({
plugins: [
new ESLintPlugin(options)
}),
],
to webpack.mix.js?
Where to add options? What recommended npm packages to be added? Anyone willing to share a current setup?
Please or to participate in this conversation.