Skip to content

Instantly share code, notes, and snippets.

@buzan92
Created April 26, 2019 07:32
Show Gist options
  • Save buzan92/bfc8c1976412652160a00174f1806728 to your computer and use it in GitHub Desktop.
Save buzan92/bfc8c1976412652160a00174f1806728 to your computer and use it in GitHub Desktop.
eslint
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"allowImportExportEverywhere": true,
"sourceType": "module"
},
"overrides": [
{
"plugins": ["@typescript-eslint"],
"files": ["**/*.ts"],
"parser": "typescript-eslint-parser",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-unused-vars": ["off"]
}
},
{
"plugins": ["eslint-plugin-vue"],
"files": ["**/*.vue"],
"parser": "vue-eslint-parser",
"parserOptions": {
"allowImportExportEverywhere": true,
"sourceType": "module",
"ecmaVersion": 2018,
"ecmaFeatures": {
"globalReturn": false,
"impliedStrict": false,
"jsx": false
}
},
"rules": {
"vue/attribute-hyphenation": 0,
"vue/html-quotes": 0,
"vue/html-self-closing": ["error", {
"html": {
"void": "never",
"normal": "never",
"component": "always"
},
"svg": "always",
"math": "always"
}],
"vue/attributes-order": [2, {
"order": [ "CONDITIONALS","LIST_RENDERING", "RENDER_MODIFIERS", "GLOBAL", "UNIQUE", "BINDING", "OTHER_ATTR", "EVENTS", "CONTENT", "DEFINITION", "CLASS"]
}],
"vue/order-in-components": ["error", {
"order": [
"el",
"name",
"parent",
"functional",
["delimiters", "comments"],
["components", "directives", "filters"],
"extends",
"mixins",
"inheritAttrs",
"model",
"fetch",
"head",
["props", "propsData"],
"data",
"computed",
"watch",
"LIFECYCLE_HOOKS",
"methods",
["template", "render"],
"renderError"
]
}],
"vue/no-dupe-keys": 2,
"vue/require-default-prop": 0,
"vue/max-attributes-per-line": [2, {
"singleline": 3,
"multiline": {
"max": 3,
"allowFirstLine": true
}
}],
"vue/prop-name-casing": 0,
"vue/html-indent": ["error", 4, {
"attribute": 1,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": []
}],
"vue/this-in-template": ["error", "never" ]
}
}
],
"rules": {
"indent": ["error", 2],
"max-len": [0, {
"tabWidth": 2
}],
"no-self-assign": [
"error",
{
"props": false
}
],
"no-redeclare": "error",
"no-lonely-if": "error",
"no-multiple-empty-lines": [
1,
{
"max": 1
}
],
"prefer-destructuring": ["error", {
"array": true,
"object": true
}, {
"enforceForRenamedProperties": false
}],
"new-parens": "error",
"block-spacing": "error",
"no-const-assign": "error",
"no-this-before-super": "warn",
"no-reserved-keys": 0,
"no-undef": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn",
"semi": [
"warn",
"always",
{
"omitLastInOneLineBlock": true
}
],
"quotes":["error", "single", { "allowTemplateLiterals": true }],
"singleline-html-element-content-newline":0,
"no-extra-semi": "error",
"callback-return": "error",
"no-constant-condition": "error",
"no-unreachable": "error",
"no-unneeded-ternary": "error",
"no-dupe-keys": "error",
"no-dupe-class-members": "error",
"key-spacing": [1, {
"singleLine": {
"beforeColon": true,
"afterColon": true
},
"multiLine": {
"align": "colon"
}
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment