Skip to content

Commit

Permalink
Chores: Remove eslint-plugin-vue-libs (#1249)
Browse files Browse the repository at this point in the history
* Chores: Remove eslint-plugin-vue-libs

* update
  • Loading branch information
ota-meshi committed Jul 18, 2020
1 parent fa6ad5c commit b9feb67
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 36 deletions.
98 changes: 92 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,97 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6
ecmaVersion: 2018
},
env: {
es6: true,
node: true,
mocha: true
},
extends: [
'plugin:eslint-plugin/recommended',
'plugin:vue-libs/recommended',
'prettier'
],
extends: ['plugin:eslint-plugin/recommended', 'prettier'],
plugins: ['eslint-plugin', 'prettier'],
rules: {
'accessor-pairs': 2,
camelcase: [2, { properties: 'never' }],
'constructor-super': 2,
eqeqeq: [2, 'allow-null'],
'handle-callback-err': [2, '^(err|error)$'],
'jsx-quotes': [2, 'prefer-single'],
'new-cap': [2, { newIsCap: true, capIsNew: false }],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 2,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, { allowLoop: false, allowSwitch: false }],
'no-lone-blocks': 2,
'no-multi-spaces': [2, { ignoreEOLComments: true }],
'no-multi-str': 2,
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, { defaultAssignment: false }],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, { vars: 'all', args: 'none' }],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-with': 2,
'one-var': [2, { initialized: 'never' }],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
yoda: [2, 'never'],
'prefer-const': 2,

'prettier/prettier': 'error',
'eslint-plugin/report-message-format': ['error', "^[A-Z`'{].*\\.$"],
'eslint-plugin/prefer-placeholders': 'error',
Expand All @@ -37,6 +115,14 @@ module.exports = {
'dot-notation': 'error'
},
overrides: [
{
files: ['./**/*.vue'],
parser: require.resolve('vue-eslint-parser'),
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
}
},
{
files: ['lib/rules/*.js'],
rules: {
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"javascriptreact",
"vue"
],
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"vetur.validation.script": false
}
54 changes: 26 additions & 28 deletions docs/.vuepress/theme/layouts/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
<template>
<BaseLayout
v-bind="$attrs"
v-on="$listeners">
<slot
name="sidebar-top"
slot="sidebar-top"
/>
<slot
name="sidebar-bottom"
slot="sidebar-bottom"
/>
<template
slot="page-top">
<BaseLayout v-bind="$attrs" v-on="$listeners">
<slot name="sidebar-top" slot="sidebar-top" />
<slot name="sidebar-bottom" slot="sidebar-bottom" />
<template slot="page-top">
<div class="theme-default-content beta-doc-description">
<div class="warning custom-block">
<p class="custom-block-title">Note</p>
<p>This is a documentation for version <code>{{docVersion}}</code>.<template v-if="hasNotYetBeenReleased"> Also, this documentation may contain content that has not yet been released.</template><br>
To check version <code>6.2.2</code> <a :href="v6DocLink">go here</a>.
To check previous releases <a href="https://github.com/vuejs/eslint-plugin-vue/releases">go here</a>.</p>
<p>
This is a documentation for version <code>{{ docVersion }}</code
>.<template v-if="hasNotYetBeenReleased">
Also, this documentation may contain content that has not yet been
released.</template
><br />
To check version <code>6.2.2</code>
<a :href="v6DocLink">go here</a>. To check previous releases
<a href="https://github.com/vuejs/eslint-plugin-vue/releases"
>go here</a
>.
</p>
</div>
</div>
<slot
name="page-top"
/>
<slot name="page-top" />
</template>
<slot
name="page-bottom"
slot="page-bottom"
/>
<slot name="page-bottom" slot="page-bottom" />
</BaseLayout>
</template>

Expand All @@ -44,21 +39,24 @@ export default {
BaseLayout
},
computed: {
docVersion () {
docVersion() {
if (version.major < 7) {
return '7.x'
}
return version.raw
},
hasNotYetBeenReleased () {
hasNotYetBeenReleased() {
if (version.major < 7) {
return true
}
return false
},
v6DocLink () {
v6DocLink() {
if (this.$page.path.endsWith('.html')) {
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path.replace(/\.html$/, '')}.md`
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path.replace(
/\.html$/,
''
)}.md`
}
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path}README.md`
}
Expand All @@ -73,7 +71,7 @@ export default {
* ::v-deep .theme-default-content ~ .theme-default-content {
padding-top: 0;
}
* ::v-deep .theme-default-content:not(.custom) h1{
* ::v-deep .theme-default-content:not(.custom) h1 {
margin-top: -3.1rem;
}
</style>
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "file:.",
"eslint-plugin-vue-libs": "^4.0.0",
"eslint4b": "^7.0.0",
"lodash": "^4.17.15",
"mocha": "^7.1.2",
Expand Down

0 comments on commit b9feb67

Please sign in to comment.