Skip to content

Commit

Permalink
Merge pull request #35 from RadKod/feature/vue3
Browse files Browse the repository at this point in the history
Feature/vue3
  • Loading branch information
selimdoyranli authored May 9, 2023
2 parents e7a0797 + 2a268c1 commit a3c7aa3
Show file tree
Hide file tree
Showing 247 changed files with 34,884 additions and 29,111 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
File renamed without changes.
12 changes: 11 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
demo/*
dist
/vue2
/vue3
/docs
/meta
coverage
node_modules
package.json
package-lock.json
yarn.lock
pnpm-lock.yaml
132 changes: 70 additions & 62 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,85 +2,93 @@ module.exports = {
root: true,
env: {
browser: true,
node: true
node: true,
jest: true
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'babel-eslint'
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
},
warnOnUnsupportedTypeScriptVersion: false,
templateTokenizer: {
pug: 'vue-eslint-parser-template-tokenizer-pug'
}
},
extends: [
'eslint:recommended',
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/recommended',
'plugin:prettier/recommended'
],
// required to lint *.vue files
plugins: ['vue'],
// add your custom rules here
extends: ['plugin:vue/strongly-recommended', 'eslint-config-prettier', 'prettier'],
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'vue/component-name-in-template-casing': 'off',
'vue/name-property-casing': 'off',
'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',
semi: [2, 'never'],
'vue/max-attributes-per-line': 'off',
'prettier/prettier': ['error', { semi: false }],
'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: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc' // for reduce accumulators
]
props: false
}
],
'vue/order-in-components': [
'@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',
{
order: [
'el',
'name',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
'inheritAttrs',
'model',
['props', 'propsData'],
'fetch',
'asyncData',
'data',
'computed',
'watch',
'LIFECYCLE_HOOKS',
'methods',
'head',
['template', 'render'],
'renderError'
]
script: {
allowNoLang: true,
lang: 'ts'
},
style: {
allowNoLang: true,
lang: 'scss'
}
}
],
'vue/attributes-order': [
'vue/no-empty-component-block': 'off',
'vue/valid-template-root': 'off',
'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',
{
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
'UNIQUE',
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'EVENTS',
'CONTENT'
]
}
{ 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' }
]
}
}
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file has been generated using '.gitattributes Generator'.
# You can generate yours at http://ihopepeace.github.io/gitattributes_generator

* text=auto

# Explicitly declare text files that should be normalized and converted
# to native line endings on checkout.

# Declare files that should have CRLF line endings on checkout.
*.js eol=crlf
*.ts eol=crlf
*.vue eol=crlf
*.css eol=crlf
*.scss eol=crlf
*.json eol=crlf

# Declare files that should have LF line endings on checkout.

# Declare files that are truly binary and shouldn't be modified.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
Expand Down Expand Up @@ -77,3 +76,6 @@ typings/

# Service worker
sw.*

#misc
demo/node_modules
6 changes: 6 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
hooks: {
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
'pre-commit': 'lint-staged'
}
}
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
./demo
./preview_assets
./dev
./docs
.vscode
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.x.x
12 changes: 11 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
demo/*
dist
/vue2
/vue3
/docs
/meta
coverage
node_modules
package.json
package-lock.json
yarn.lock
pnpm-lock.yaml
70 changes: 56 additions & 14 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,60 @@
module.exports = {
arrowParens: 'avoid',
bracketSpacing: true,
htmlWhitespaceSensitivity: 'css',
insertPragma: false,
jsxBracketSameLine: false,
jsxSingleQuote: false,
proseWrap: 'preserve',
quoteProps: 'as-needed',
requirePragma: false,
semi: false,
pugPrintWidth: 140,
pugSingleQuote: false,
pugAttributeSeparator: 'none',
pugEmptyAttributes: 'none',
singleQuote: true,
tabWidth: 2,
printWidth: 140,
trailingComma: 'none',
useTabs: false,
vueIndentScriptAndStyle: false,
printWidth: 100
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',
'^@'
]
}
9 changes: 8 additions & 1 deletion .stylelintignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
demo/*
dist
/vue2
/docs
/meta
*.min.*
assets/**/*/vendor
static/
public/
50 changes: 42 additions & 8 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
module.exports = {
extends: [
// "stylelint-config-standard",
'stylelint-config-rational-order'
//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'
],
plugins: ['stylelint-order', 'stylelint-config-rational-order/plugin'],
rules: {
'order/properties-order': [],
'plugin/rational-order': [
true,
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',
{
'border-in-box-model': false,
'empty-line-between-groups': false
ignore: ['after-comment', 'first-nested'],
severity: 'warning'
}
]
}
Expand Down
9 changes: 9 additions & 0 deletions .vscode/extensions.json
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"
]
}
Loading

0 comments on commit a3c7aa3

Please sign in to comment.