Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"path": "cz-conventional-changelog",
"disableScopeLowerCase": false,
"disableSubjectLowerCase": false,
"maxHeaderWidth": 200,
"maxLineWidth": 200
}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,jsx,ts,tsx,vue}]
quote_type=single
max_line_length = 150
3 changes: 2 additions & 1 deletion .eslintignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/node_modules/**/*
**/lib/*
**/lib/*
packages/composables/nuxt/plugin.js
176 changes: 176 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
const { resolve } = require('path');

module.exports = {
env: {
jest: true,
node: true,
browser: true,
es6: true,
commonjs: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: [
resolve(__dirname, './tsconfig.base.json'),
resolve(__dirname, './packages/api-client/tsconfig.json'),
resolve(__dirname, './packages/composables/tsconfig.json'),
resolve(__dirname, './packages/theme/tsconfig.json')
],
tsconfigRootDir: __dirname,
extraFileExtensions: ['.vue'],
ecmaVersion: 2021,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
'vue',
'import',
'unicorn',
'jest',
],
extends: [
'eslint:recommended',
'airbnb-base',
'plugin:promise/recommended',
'plugin:unicorn/recommended',
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:vue/base',
'plugin:vue/essential',
'plugin:vue/recommended',
'plugin:vue/strongly-recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:jest/recommended',
],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'no-console': (process.env.NODE_ENV === 'production') ? 'error' : 'off',
'no-debugger': (process.env.NODE_ENV === 'production') ? 'error' : 'off',
'unicorn/no-new-array': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/prefer-array-some': 'off',
'unicorn/catch-error-name': [
2,
{
name: 'error',
ignore: ['^e(rr)?$'],
},
],
'prefer-promise-reject-errors': 'off',
'no-shadow': 'off',
'no-redeclare': 'off',
'no-unused-vars': 'off',
'no-case-declarations': 0,
'unicorn/no-null': 0,
'unicorn/no-reduce': 0,
'unicorn/no-array-for-each': 0,
'unicorn/prevent-abbreviations': 0,
'unicorn/no-object-as-default-parameter': 0,
'unicorn/no-abusive-eslint-disable': 0,
'unicorn/consistent-function-scoping': 0,
'unicorn/consistent-destructuring': 0,
'unicorn/filename-case': [
0,
{
cases: {
kebabCase: false,
pascalCase: true,
camelCase: true,
},
// ignore UPPER_CASE markdown filenames
ignore: [/^[A-Z](([\dA-Z]+_)*[\dA-Z]+)?\.(mdx|d\.ts)?$/],
},
],
quotes: ['warn', 'single'],
'no-unused-expressions': ['warn', {
'allowShortCircuit': true,
'allowTernary': true,
}],
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-redeclare': ['error'],
'@typescript-eslint/indent': ['warn', 2],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
'ignoreRestSiblings': true,
'argsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^ignore',
}],
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
},
{
selector: 'function',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'typeLike',
format: ['PascalCase', 'UPPER_CASE'],
},
],
'max-len': ['error', {
code: 150,
ignoreComments: true,
ignoreUrls: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
}],
'class-methods-use-this': 'off',
'no-new': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unnecessary-type-assertion': 0,
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e', // for e.returnvalue
'options', // for decorators
],
}],
'import/no-unresolved': 'off',
'import/named': 'off',
'import/export': 'off',
'import/no-cycle': 'off',
'import/prefer-default-export': 'off', // Allow single Named-export
'import/extensions': ['error', 'always', {
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
}],
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error',
'jest/no-disabled-tests': 'warn',
'jest/prefer-to-have-length': 'warn',
},
settings: {
'import/extensions': [
'.js',
'.jsx',
'.mjs',
'.ts',
'.tsx',
'.vue',
],
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'],
},
typescript: {},
},
},
}
137 changes: 0 additions & 137 deletions .eslintrc.json

This file was deleted.

Loading