Skip to content

Instantly share code, notes, and snippets.

@KarmaBlackshaw
Last active March 2, 2021 05:45
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 KarmaBlackshaw/970b3f6f5876b30acfa9be7a59dfc6d6 to your computer and use it in GitHub Desktop.
Save KarmaBlackshaw/970b3f6f5876b30acfa9be7a59dfc6d6 to your computer and use it in GitHub Desktop.
Lint Configurations
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
extends: ["standard", 'eslint:recommended'],
parserOptions: {
ecmaVersion: 2018,
},
rules: {
quotes: ['error', 'single', { avoidEscape: true }],
'prefer-const': 'error',
'no-console': 'off',
'no-undef': 'off',
'arrow-parens': [2, 'as-needed'],
},
globals: {
"RngError": "readonly"
}
}
module.exports = {
root: true,
env: {
node: true,
browser: true
},
extends: [
'eslint:recommended',
'plugin:vue/essential',
'@vue/standard',
'plugin:vue/recommended'
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'babel-eslint'
},
rules: {
"array-bracket-spacing": [
"error",
"never"
],
"array-callback-return": "error",
"arrow-parens": [
"error",
"as-needed"
],
"arrow-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
"camelcase": "off",
"comma-dangle": "error",
"default-case": "error",
"indent": [
"error",
2,
{
"ignoredNodes": [
"TemplateLiteral"
]
}
],
"no-alert": "off",
"no-await-in-loop": "error",
"no-console": "off",
"no-debugger": "off",
"no-else-return": "error",
"no-empty-function": "error",
"no-labels": "off",
"no-loop-func": "error",
"no-new": "off",
"no-prototype-builtins": "off",
"no-return-await": "error",
"no-shadow": "error",
"no-useless-catch": "off",
"no-var": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"require-await": "error",
"template-curly-spacing": "off",
"vue/component-definition-name-casing": [
"error",
"PascalCase"
],
"vue/component-name-in-template-casing": "off",
"vue/html-closing-bracket-newline": [
"error",
{
"singleline": "never",
"multiline": "always"
}
],
"vue/html-end-tags": "error",
"vue/html-indent": [
"error",
2,
{
"attribute": 1,
"baseIndent": 1,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": []
}
],
"vue/html-self-closing": [
"error",
{
"html": {
"void": "never",
"normal": "never",
"component": "always"
},
"svg": "always",
"math": "always"
}
],
"vue/max-attributes-per-line": [
"error",
{
"singleline": 1
}
],
"vue/no-v-html": "off",
"vue/object-curly-spacing": [
"error",
"always"
],
"vue/this-in-template": [
"error",
"never"
],
"vue/v-bind-style": [
"error",
"shorthand"
],
"vue/v-on-style": [
"error",
"shorthand"
]
},
overrides: [
{
files: ['src/assets/js/translations/**/*.js'],
rules: {
camelcase: 'off'
}
},
{
files: ['tests/**/*.js'],
rules: {
'no-undef': 'off'
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment