Skip to content

Instantly share code, notes, and snippets.

@karupanerura
Last active April 25, 2020 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karupanerura/b62c7312a83ed23774a967fe8a31adac to your computer and use it in GitHub Desktop.
Save karupanerura/b62c7312a83ed23774a967fe8a31adac to your computer and use it in GitHub Desktop.
Does ESLint override breaks processor property?
const baseExtends = [
'eslint:recommended',
]
module.exports = {
env: {
browser: true,
node: true,
es6: true
},
extends: baseExtends,
parser: 'babel-eslint',
overrides: [
{
files: '*.vue',
extends: [
...baseExtends,
'plugin:vue/recommended',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'babel-eslint',
}
},
{
files: '*.ts',
extends: [
...baseExtends,
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module'
},
}
],
// add your custom rules here
rules: {
'no-console': 0,
'vue/html-closing-bracket-newline': [2, {'multiline': 'never'}],
'no-extra-parens': 1,
'no-multi-spaces': 2,
'no-multiple-empty-lines': [2, {'max': 1}],
'func-call-spacing': [2, 'never'],
'no-unneeded-ternary': 2,
'semi': [2, 'never'],
'quotes': [2, 'single'],
'no-var': 2,
'indent': [2, 2],
'space-in-parens': [2, 'never'],
'comma-spacing': 2,
'computed-property-spacing': 2,
'key-spacing': 2,
'keyword-spacing': 2,
}
}
> monzllis-website@1.0.0 lint $HOME/.go/src/github.com/$USER/monzllis-website
> eslint --ext .ts --ext .vue src
$HOME/.go/src/github.com/$USER/monzllis-website/src/components/profile.vue
39:15 warning 'v-html' directive can lead to XSS attack vue/no-v-html
$HOME/.go/src/github.com/$USER/monzllis-website/src/index.ts
1:1 error Use the latest vue-eslint-parser. See also https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error vue/html-closing-bracket-newline
$HOME/.go/src/github.com/$USER/monzllis-website/src/models/collection.ts
1:1 error Use the latest vue-eslint-parser. See also https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error vue/html-closing-bracket-newline
$HOME/.go/src/github.com/$USER/monzllis-website/src/models/contact.ts
1:1 error Use the latest vue-eslint-parser. See also https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error vue/html-closing-bracket-newline
$HOME/.go/src/github.com/$USER/monzllis-website/src/models/disk.ts
1:1 error Use the latest vue-eslint-parser. See also https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error vue/html-closing-bracket-newline
$HOME/.go/src/github.com/$USER/monzllis-website/src/models/member.ts
1:1 error Use the latest vue-eslint-parser. See also https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error vue/html-closing-bracket-newline
$HOME/.go/src/github.com/$USER/monzllis-website/src/types/sfc.ts
1:1 error Use the latest vue-eslint-parser. See also https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error vue/html-closing-bracket-newline
✖ 7 problems (6 errors, 1 warning)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! monzllis-website@1.0.0 lint: `eslint --ext .ts --ext .vue src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the monzllis-website@1.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! $HOME/.npm/_logs/2020-04-25T05_05_16_464Z-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment