Skip to content

Commit f432652

Browse files
committed
work as a plugin
1 parent ef85b46 commit f432652

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

lib/index.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// @ts-check
2+
"use strict";
3+
4+
/** @type {import('eslint').ESLint.Plugin} */
5+
module.exports = {
6+
rules: {
7+
"vue-sort-components": require("./rules/vue-sort-components"),
8+
},
9+
configs: {
10+
recommended: {
11+
plugins: ["vue-sort-components"],
12+
rules: {
13+
"vue-sort-components/vue-sort-components": "error",
14+
},
15+
},
16+
},
17+
};
File renamed without changes.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "eslint-plugin-vue-sort-components",
33
"version": "1.0.0",
44
"description": "A plugin for ESLint to keep order of component names",
5-
"main": "index.js",
5+
"main": "lib/index.js",
66
"scripts": {
77
"format": "prettier --check ./**/*.js",
88
"lint": "eslint .",
9-
"test": "mocha tests/",
10-
"test:watch": "mocha --watch --reporter min tests/"
9+
"test": "mocha tests/**/*.js",
10+
"test:watch": "mocha --watch --reporter min tests/**/*.js"
1111
},
1212
"repository": {
1313
"type": "git",

tests/vue-sort-components.spec.js renamed to tests/lib/rules/vue-sort-components.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22
"use strict";
33

4-
const rule = require("../rules/vue-sort-components");
4+
const rule = require("../../../lib/rules/vue-sort-components");
55
const RuleTester = require("eslint").RuleTester;
66

77
const ruleTester = new RuleTester();

0 commit comments

Comments
 (0)