-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add eslint, prettier, sass, pug
- Loading branch information
selimdoyranli
committed
May 8, 2023
1 parent
0efb86b
commit a4de217
Showing
25 changed files
with
3,317 additions
and
1,100 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
dist | ||
/vue2 | ||
/vue3 | ||
/docs | ||
/meta | ||
coverage | ||
node_modules | ||
package.json | ||
package-lock.json | ||
yarn.lock | ||
pnpm-lock.yaml |
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,93 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
jest: true | ||
}, | ||
parser: 'vue-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
legacyDecorators: true | ||
}, | ||
warnOnUnsupportedTypeScriptVersion: false, | ||
templateTokenizer: { | ||
pug: 'vue-eslint-parser-template-tokenizer-pug' | ||
} | ||
}, | ||
extends: ['plugin:vue/strongly-recommended', 'eslint-config-prettier', 'prettier'], | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
rules: { | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
endOfLine: 'crlf' | ||
} | ||
], | ||
'max-len': [ | ||
'error', | ||
{ | ||
code: 150, | ||
ignoreComments: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true | ||
} | ||
], | ||
'no-multiple-empty-lines': [2, { max: 2 }], | ||
semi: ['error', 'never'], | ||
'arrow-parens': ['error', 'as-needed'], | ||
'no-extend-native': 'off', | ||
'space-before-function-paren': 'off', | ||
camelcase: 'off', | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-throw-literal': 'off', | ||
'no-param-reassign': [ | ||
'error', | ||
{ | ||
props: false | ||
} | ||
], | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'vue/component-definition-name-casing': ['error', 'PascalCase'], | ||
'vue/multi-word-component-names': 'off', | ||
'vue/component-tags-order': ['error', { order: ['template', 'script', 'style', 'docs'] }], | ||
'vue/padding-line-between-blocks': ['error'], | ||
'vue/block-lang': [ | ||
'error', | ||
{ | ||
script: { | ||
allowNoLang: true, | ||
lang: 'ts' | ||
}, | ||
style: { | ||
allowNoLang: true, | ||
lang: 'scss' | ||
} | ||
} | ||
], | ||
'vue/no-empty-component-block': ['error'], | ||
'vue/no-static-inline-styles': 'off', | ||
'vue/require-prop-types': ['error'], | ||
'vue/require-default-prop': ['error'], | ||
'vue/attribute-hyphenation': ['error', 'always'], | ||
'vue/v-on-event-hyphenation': ['error', 'always'], | ||
'vue/html-self-closing': 'off', | ||
'vue/no-v-html': 'off', | ||
'vue/order-in-components': ['error'], | ||
'padding-line-between-statements': [ | ||
'error', | ||
{ blankLine: 'always', prev: '*', next: 'return' }, | ||
{ blankLine: 'always', prev: '*', next: 'if' }, | ||
{ blankLine: 'always', prev: '*', next: 'switch' }, | ||
{ blankLine: 'always', prev: '*', next: 'for' }, | ||
{ blankLine: 'always', prev: '*', next: 'function' }, | ||
{ blankLine: 'never', prev: 'import', next: 'import' }, | ||
{ blankLine: 'always', prev: 'import', next: 'export' }, | ||
{ blankLine: 'always', prev: 'expression', next: 'export' }, | ||
{ blankLine: 'always', prev: 'import', next: 'expression' } | ||
] | ||
} | ||
} |
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,5 +1,6 @@ | ||
module.exports = { | ||
hooks: { | ||
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS', | ||
'pre-commit': 'lint-staged' | ||
} | ||
} |
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,3 +1,4 @@ | ||
./demo | ||
./dev | ||
./docs | ||
.vscode |
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,11 @@ | ||
dist | ||
/vue2 | ||
/vue3 | ||
/docs | ||
/meta | ||
coverage | ||
node_modules | ||
package.json | ||
package-lock.json | ||
yarn.lock | ||
pnpm-lock.yaml |
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,60 @@ | ||
module.exports = { | ||
pugPrintWidth: 140, | ||
pugSingleQuote: false, | ||
pugAttributeSeparator: 'none', | ||
pugEmptyAttributes: 'none', | ||
singleQuote: true, | ||
printWidth: 140, | ||
trailingComma: 'none', | ||
tabWidth: 2, | ||
semi: false, | ||
bracketSpacing: true, | ||
arrowParens: 'avoid', | ||
pugSortAttributesBeginning: [ | ||
'^cols$', | ||
'^v-else$', | ||
'^v-for$', | ||
'^:key$', | ||
'^v-if$', | ||
'^v-else-if$', | ||
'^v-on$', | ||
'^v-bind$', | ||
'^ref$', | ||
'^v-model', | ||
'^name$', | ||
'^:?type$', | ||
'^:value$', | ||
'^v-text$', | ||
'^:?label$', | ||
'^:headers$', | ||
'^:items$', | ||
'^:?item-text$', | ||
'^:?item-value$', | ||
'^:?item-disabled$', | ||
'^:?placeholder$', | ||
'^:?src$', | ||
'^:?color$', | ||
'^:?text-color$', | ||
'^:?icon$', | ||
'^:?small$' | ||
], | ||
pugSortAttributesEnd: [ | ||
'^:?hint$', | ||
'^:?persistent-hint$', | ||
'^prepend-', | ||
'^@click:prepend', | ||
'^append-', | ||
'^@click:append', | ||
'^:to$', | ||
'^exact$', | ||
'^:(?!(width|height|loading|disabled|data-))', | ||
'^target$', | ||
'^:?width$', | ||
'^:?height$', | ||
'^:loading$', | ||
'^:disabled$', | ||
'^:?data-', | ||
'^@click', | ||
'^@' | ||
] | ||
} |
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,8 @@ | ||
dist | ||
/vue2 | ||
/docs | ||
/meta | ||
*.min.* | ||
assets/**/*/vendor | ||
static/ | ||
public/ |
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,51 @@ | ||
module.exports = { | ||
extends: [ | ||
//https://github.com/constverum/stylelint-config-rational-order | ||
'stylelint-config-rational-order', | ||
// https://github.com/shannonmoeller/stylelint-config-prettier | ||
'stylelint-config-prettier' | ||
], | ||
overrides: [ | ||
{ | ||
customSyntax: 'postcss-scss', | ||
files: ['**/*.{css,sass,scss,less,stylus}'] | ||
}, | ||
{ | ||
customSyntax: 'postcss-html', | ||
files: ['*.vue', '**/*.vue'] | ||
} | ||
], | ||
plugins: [ | ||
// https://github.com/kristerkari/stylelint-scss#list-of-rules | ||
'stylelint-scss', | ||
// https://github.com/hudochenkov/stylelint-order | ||
'stylelint-order', | ||
'stylelint-config-rational-order/plugin' | ||
], | ||
rules: { | ||
indentation: [ | ||
2, | ||
{ | ||
baseIndentLevel: 0 | ||
} | ||
], | ||
'color-named': 'never', | ||
'color-function-notation': 'legacy', | ||
'at-rule-no-unknown': null, | ||
'declaration-empty-line-before': [ | ||
'always', | ||
{ | ||
except: ['after-declaration'], | ||
ignore: ['after-comment', 'first-nested', 'inside-single-line-block'], | ||
severity: 'warning' | ||
} | ||
], | ||
'rule-empty-line-before': [ | ||
'always', | ||
{ | ||
ignore: ['after-comment', 'first-nested'], | ||
severity: 'warning' | ||
} | ||
] | ||
} | ||
} |
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,9 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"stylelint.vscode-stylelint", | ||
"editorconfig.editorconfig", | ||
"octref.vetur", | ||
"fallenmax.mithril-emmet" | ||
] | ||
} |
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,21 @@ | ||
{ | ||
"emmet.showAbbreviationSuggestions": true, | ||
"emmet.showExpandedAbbreviation": "always", | ||
"emmet.includeLanguages": { | ||
"vue-html": "html", | ||
"vue": "jade" | ||
}, | ||
"files.insertFinalNewline": true, | ||
"editor.insertSpaces": true, | ||
"editor.detectIndentation": false, | ||
"css.validate": false, | ||
"less.validate": false, | ||
"scss.validate": false, | ||
"stylelint.validate": ["css", "scss", "html", "vue"], | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.stylelint": true, | ||
"source.fixAll.eslint": true | ||
}, | ||
"editor.tabSize": 2, | ||
"explorer.compactFolders": false | ||
} |
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.