1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/guyangyang-vue-amap

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
.eslintrc.cjs 2.8 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
gyy Отправлено 31.01.2024 18:49 d1f1fa7
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
tsx: true,
},
},
env: {
browser: true,
node: false,
},
globals: {
jest: 'readonly',
"AMap": true,
"particlesJS": true,
"expect": true,
"sinon": true,
"Loca": true,
"VueAmap": true
},
plugins: ['@typescript-eslint', 'import'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended'
],
overrides: [
{
files: ['*.ts', '*.vue'],
rules: {
'no-undef': 'off',
},
},
{
files: ['**/__tests__/**', '**/gulpfile.ts'],
rules: {
'no-console': 'off',
},
},
],
rules: {
// js/ts
'semi': ['error', 'always'],
'space-before-function-paren': ["error", "always"],
'no-console': ['warn', { allow: ['error'] }],
'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'],
camelcase: ['error', { properties: 'never' }],
'no-var': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-void': 'error',
'prefer-const': [
'warn',
{ destructuring: 'all', ignoreReadBeforeAssign: true },
],
'prefer-template': 'error',
'object-shorthand': [
'error',
'always',
{ ignoreConstructors: false, avoidQuotes: true },
],
'block-scoped-var': 'error',
'no-constant-condition': ['error', { checkLoops: false }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{ disallowTypeAnnotations: false },
],
'@typescript-eslint/no-this-alias': ['off'],
// vue
'vue/no-v-html': 'off',
'vue/require-default-prop': 'off',
'vue/require-explicit-emits': 'off',
'vue/multi-word-component-names': 'off',
// import
'import/first': 'error',
'import/no-duplicates': 'error',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'object',
'type',
],
pathGroups: [
{
pattern: 'vue',
group: 'external',
position: 'before',
},
{
pattern: '@vue/**',
group: 'external',
position: 'before',
}
],
pathGroupsExcludedImportTypes: ['type'],
},
],
},
}
1
https://api.gitlife.ru/oschina-mirror/guyangyang-vue-amap.git
git@api.gitlife.ru:oschina-mirror/guyangyang-vue-amap.git
oschina-mirror
guyangyang-vue-amap
guyangyang-vue-amap
dev