-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from vkoves/install-prettier
Install Prettier For Automatic Code Formatting (JS, HTML, & SCSS)
- Loading branch information
Showing
60 changed files
with
2,721 additions
and
2,500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,112 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'node': true, | ||
'es2021': true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es2021: true, | ||
}, | ||
'extends': [ | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:vue/recommended', | ||
], | ||
'parserOptions': { | ||
"parser": "@typescript-eslint/parser", | ||
"project": "./tsconfig.json", | ||
'extraFileExtensions': [ '.vue' ] | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
project: './tsconfig.json', | ||
extraFileExtensions: ['.vue'], | ||
}, | ||
'plugins': [ | ||
'vue', | ||
], | ||
'rules': { | ||
'max-len': ['error', { | ||
'code': 100, | ||
// Fixes errors in HTML files with long links | ||
'ignoreUrls': true, | ||
}], | ||
plugins: ['vue'], | ||
rules: { | ||
'max-len': [ | ||
'error', | ||
{ | ||
code: 100, | ||
// Fixes errors in HTML files with long links | ||
ignoreUrls: true, | ||
}, | ||
], | ||
|
||
// Disable stylistic rules that interfere with Prettier | ||
'vue/html-closing-bracket-newline': 'off', | ||
'vue/html-self-closing': 'off', | ||
'vue/max-attributes-per-line': 'off', | ||
'vue/singleline-html-element-content-newline': 'off', | ||
'vue/html-indent': 'off', | ||
|
||
'vue/multi-word-component-names': ['off'], | ||
// This rule is for Vue3, and Gridsome uses Vue2 | ||
'vue/no-deprecated-filter': ['off'], | ||
// Don't make <g-link> multiline, it adds spaces | ||
"vue/multiline-html-element-content-newline": ["error", { | ||
"ignores": [ | ||
"g-link", | ||
// Original inline elements from: https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/utils/inline-non-void-elements.json | ||
"a", "abbr", "audio", "b", "bdi", "bdo", "canvas", "cite", "code", "data", "del", "dfn", "em", "i", "iframe", "ins", "kbd", "label", "map", "mark", "noscript", "object", "output", "picture", "q", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "svg", "time", "u", "var", "video" | ||
], | ||
}], | ||
"vue/singleline-html-element-content-newline": ["error", { | ||
"externalIgnores": ["g-link"] | ||
}], | ||
'vue/multiline-html-element-content-newline': [ | ||
'error', | ||
{ | ||
ignores: [ | ||
'g-link', | ||
// Original inline elements from: https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/utils/inline-non-void-elements.json | ||
'a', | ||
'abbr', | ||
'audio', | ||
'b', | ||
'bdi', | ||
'bdo', | ||
'canvas', | ||
'cite', | ||
'code', | ||
'data', | ||
'del', | ||
'dfn', | ||
'em', | ||
'i', | ||
'iframe', | ||
'ins', | ||
'kbd', | ||
'label', | ||
'map', | ||
'mark', | ||
'noscript', | ||
'object', | ||
'output', | ||
'picture', | ||
'q', | ||
'ruby', | ||
's', | ||
'samp', | ||
'small', | ||
'span', | ||
'strong', | ||
'sub', | ||
'sup', | ||
'svg', | ||
'time', | ||
'u', | ||
'var', | ||
'video', | ||
], | ||
}, | ||
], | ||
|
||
'@typescript-eslint/indent': ['error', 2], | ||
"semi": ["error", "always"], | ||
"arrow-parens": ["error", "always"], | ||
"comma-dangle": ["error", "always-multiline"], | ||
semi: ['error', 'always'], | ||
'arrow-parens': ['error', 'always'], | ||
'comma-dangle': ['error', 'always-multiline'], | ||
|
||
"@typescript-eslint/explicit-function-return-type": ["error", { | ||
"allowExpressions": true, | ||
"allowHigherOrderFunctions": true, | ||
"allowTypedFunctionExpressions": true | ||
}] | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'error', | ||
{ | ||
allowExpressions: true, | ||
allowHigherOrderFunctions: true, | ||
allowTypedFunctionExpressions: true, | ||
}, | ||
], | ||
}, | ||
'overrides': [ | ||
overrides: [ | ||
{ | ||
'files': ['*.vue', 'declarations/*.ts'], | ||
'rules': { | ||
'indent': 'off', | ||
files: ['*.vue', 'declarations/*.ts'], | ||
rules: { | ||
indent: 'off', | ||
'@typescript-eslint/indent': 'off', | ||
'@typescript-eslint/no-var-requires': 0, | ||
} | ||
} | ||
] | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ignore built files | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.