File tree Expand file tree Collapse file tree 10 files changed +89
-8
lines changed Expand file tree Collapse file tree 10 files changed +89
-8
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ module.exports = {
2828 rules : {
2929 "consistent-docs-description" : "error" ,
3030 "no-invalid-meta" : "error" ,
31+ 'eslint-plugin/require-meta-type' : 'error' ,
3132 "require-meta-docs-url" : [ "error" , {
3233 "pattern" : `https://vuejs.github.io/eslint-plugin-vue/rules/{{name}}.html`
3334 } ]
Original file line number Diff line number Diff line change 1+ /*
2+ * IMPORTANT!
3+ * This file has been automatically generated,
4+ * in order to update it's content execute "npm run update"
5+ */
6+ module . exports = {
7+ rules : {
8+ 'vue/html-closing-bracket-newline' : 'off' ,
9+ 'vue/html-closing-bracket-spacing' : 'off' ,
10+ 'vue/html-indent' : 'off' ,
11+ 'vue/html-quotes' : 'off' ,
12+ 'vue/html-self-closing' : 'off' ,
13+ 'vue/max-attributes-per-line' : 'off' ,
14+ 'vue/multiline-html-element-content-newline' : 'off' ,
15+ 'vue/mustache-interpolation-spacing' : 'off' ,
16+ 'vue/no-multi-spaces' : 'off' ,
17+ 'vue/no-spaces-around-equal-signs-in-attribute' : 'off' ,
18+ 'vue/script-indent' : 'off' ,
19+ 'vue/singleline-html-element-content-newline' : 'off'
20+ }
21+ }
Original file line number Diff line number Diff line change @@ -73,8 +73,9 @@ module.exports = {
7373 configs : {
7474 'base' : require ( './configs/base' ) ,
7575 'essential' : require ( './configs/essential' ) ,
76- 'strongly-recommended' : require ( './configs/strongly-recommended' ) ,
77- 'recommended' : require ( './configs/recommended' )
76+ 'no-layout-rules' : require ( './configs/no-layout-rules' ) ,
77+ 'recommended' : require ( './configs/recommended' ) ,
78+ 'strongly-recommended' : require ( './configs/strongly-recommended' )
7879 } ,
7980 processors : {
8081 '.vue' : require ( './processor' )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const utils = require('../utils')
1717
1818module . exports = {
1919 meta : {
20- type : 'layout ' ,
20+ type : 'suggestion ' ,
2121 docs : {
2222 description : 'enforce `v-bind` directive style' ,
2323 category : 'strongly-recommended' ,
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const utils = require('../utils')
1717
1818module . exports = {
1919 meta : {
20- type : 'layout ' ,
20+ type : 'suggestion ' ,
2121 docs : {
2222 description : 'enforce `v-on` directive style' ,
2323 category : 'strongly-recommended' ,
Original file line number Diff line number Diff line change 5353 "@types/node" : " ^4.2.16" ,
5454 "babel-eslint" : " ^8.2.2" ,
5555 "chai" : " ^4.1.0" ,
56- "eslint" : " ^5.2.0 " ,
57- "eslint-plugin-eslint-plugin" : " ^1.4.0 " ,
56+ "eslint" : " ^5.11.1 " ,
57+ "eslint-plugin-eslint-plugin" : " ^2.0.1 " ,
5858 "eslint-plugin-vue-libs" : " ^3.0.0" ,
5959 "eslint4b" : " ^5.1.0" ,
6060 "lodash" : " ^4.17.4" ,
Original file line number Diff line number Diff line change 1+ /**
2+ * @author Michał Sajnóg <https://github.com/michalsnik>
3+ * See LICENSE file in root directory for full license.
4+ */
5+
6+ 'use strict'
7+
8+ const fs = require ( 'fs' )
9+ const path = require ( 'path' )
10+ const ROOT = path . resolve ( __dirname , '../../lib/configs' )
11+
12+ module . exports =
13+ fs . readdirSync ( ROOT )
14+ . filter ( file => path . extname ( file ) === '.js' )
15+ . map ( file => path . basename ( file , '.js' ) )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const fs = require('fs')
1313const path = require ( 'path' )
1414const eslint = require ( 'eslint' )
1515const rules = require ( './lib/rules' )
16- const categories = require ( './lib/categories ' )
16+ const configs = require ( './lib/configs ' )
1717
1818// Update files.
1919const filePath = path . resolve ( __dirname , '../lib/index.js' )
@@ -29,7 +29,7 @@ module.exports = {
2929 ${ rules . map ( rule => `'${ rule . name } ': require('./rules/${ rule . name } ')` ) . join ( ',\n' ) }
3030 },
3131 configs: {
32- ${ categories . map ( category => `'${ category . categoryId } ': require('./configs/${ category . categoryId } ')` ) . join ( ',\n' ) }
32+ ${ configs . map ( config => `'${ config } ': require('./configs/${ config } ')` ) . join ( ',\n' ) }
3333 },
3434 processors: {
3535 '.vue': require('./processor')
Original file line number Diff line number Diff line change 1+ /**
2+ * @author Michał Sajnóg
3+ * @copyright 2018 Michał Sajnóg. All rights reserved.
4+ * See LICENSE file in root directory for full license.
5+ */
6+ 'use strict'
7+
8+ /*
9+ * This script updates `lib/configs/prettier.js`,
10+ * and disables all layout rules
11+ */
12+
13+ const fs = require ( 'fs' )
14+ const path = require ( 'path' )
15+ const rules = require ( './lib/rules' )
16+
17+ const rulesToDisable = rules . filter ( ( { meta } ) => meta . type === 'layout' )
18+
19+ function formatRules ( rules ) {
20+ const obj = rules . reduce ( ( setting , rule ) => {
21+ setting [ rule . ruleId ] = 'off'
22+ return setting
23+ } , { } )
24+ return JSON . stringify ( obj , null , 2 )
25+ }
26+
27+ function generateConfig ( rules ) {
28+ return `/*
29+ * IMPORTANT!
30+ * This file has been automatically generated,
31+ * in order to update it's content execute "npm run update"
32+ */
33+ module.exports = {
34+ rules: ${ formatRules ( rules ) }
35+ }
36+ `
37+ }
38+
39+ // Update files.
40+ const filePath = path . resolve ( __dirname , '../lib/configs/no-layout-rules.js' )
41+ const content = generateConfig ( rulesToDisable )
42+ fs . writeFileSync ( filePath , content )
Original file line number Diff line number Diff line change 55 */
66'use strict'
77
8+ require ( './update-no-layout-rules-config' )
89require ( './update-lib-configs' )
910require ( './update-lib-index' )
1011require ( './update-docs' )
You can’t perform that action at this time.
0 commit comments