Skip to content

Commit 52d4bd9

Browse files
committed
Create prepublishOnly script
1 parent e8e1637 commit 52d4bd9

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

bin/lint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env node
22

3-
const { CLIEngine } = require("eslint");
4-
const a11yPlugin = require("../src");
3+
const { ESLint } = require("eslint");
4+
const a11yPlugin = require("../dist");
55

66
(async function () {
7-
const cli = new CLIEngine({ baseConfig: a11yPlugin.configs.recommended });
7+
const cli = new ESLint({ baseConfig: a11yPlugin.configs.recommended });
88
cli.addPlugin("eslint-plugin-vuejs-accessibility", a11yPlugin);
99

1010
const report = cli.executeOnFiles(process.argv.slice(2));

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
"name": "eslint-plugin-vuejs-accessibility",
33
"version": "0.6.2",
44
"description": "An eslint plugin for checking Vue.js files for accessibility",
5-
"main": "src/index.js",
5+
"main": "dist/src/index.js",
66
"scripts": {
77
"lint": "eslint --cache .",
8+
"prepublishOnly": "tsc -p tsconfig.build.json",
89
"test": "jest"
910
},
1011
"author": "Kevin Newton",

tsconfig.build.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": ["src/rules/__tests__", "jest.setup.ts"]
4+
}

tsconfig.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"compilerOptions": {
3-
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
4-
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
5-
"allowJs": true, /* Allow javascript files to be compiled. */
6-
"outDir": "./dist", /* Redirect output structure to the directory. */
7-
"strict": true, /* Enable all strict type-checking options. */
8-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
9-
"resolveJsonModule": true
3+
"target": "es2019",
4+
"module": "commonjs",
5+
"strict": true,
6+
"esModuleInterop": true,
7+
"resolveJsonModule": true,
8+
"outDir": "./dist"
109
}
1110
}

0 commit comments

Comments
 (0)