Skip to content

Commit 26ff5dc

Browse files
committed
build settings
1 parent abde6aa commit 26ff5dc

File tree

6 files changed

+18
-17
lines changed

6 files changed

+18
-17
lines changed

.eslintrc.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
/** @type {import('eslint/lib/shared/types').ConfigData} */
12
module.exports = {
3+
ignorePatterns: "lib/*",
24
env: {
35
commonjs: true,
46
es2021: true,

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
lib/

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
],
1010
"scripts": {
1111
"prepare": "husky install",
12+
"prebuild": "node -e \"fs.rmSync(`lib/`, { recursive: true, force: true })\"",
13+
"build": "tsc",
1214
"format": "prettier --check ./**/*.[jt]s",
1315
"lint": "eslint .",
1416
"test": "mocha",

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ const plugin: ESLint.Plugin = {
1616
},
1717
};
1818

19-
export default plugin;
19+
export = plugin;

tsconfig.json

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
22
"compilerOptions": {
33
/* Visit https://aka.ms/tsconfig to read more about this file */
4-
54
/* Projects */
65
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
76
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
87
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
98
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
109
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1110
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12-
1311
/* Language and Environment */
14-
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
12+
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
1513
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
1614
// "jsx": "preserve", /* Specify what JSX code is generated. */
1715
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
@@ -23,9 +21,8 @@
2321
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
2422
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
2523
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26-
2724
/* Modules */
28-
"module": "commonjs", /* Specify what module code is generated. */
25+
"module": "commonjs", /* Specify what module code is generated. */
2926
// "rootDir": "./", /* Specify the root folder within your source files. */
3027
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
3128
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
@@ -37,19 +34,17 @@
3734
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
3835
// "resolveJsonModule": true, /* Enable importing .json files. */
3936
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
40-
4137
/* JavaScript Support */
4238
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
4339
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
4440
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
45-
4641
/* Emit */
4742
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
4843
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
4944
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
5045
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
5146
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
52-
// "outDir": "./", /* Specify an output folder for all emitted files. */
47+
"outDir": "./lib", /* Specify an output folder for all emitted files. */
5348
// "removeComments": true, /* Disable emitting comments. */
5449
// "noEmit": true, /* Disable emitting files from a compilation. */
5550
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
@@ -67,16 +62,14 @@
6762
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
6863
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
6964
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
70-
7165
/* Interop Constraints */
7266
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
7367
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
74-
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
68+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
7569
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
76-
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
77-
70+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
7871
/* Type Checking */
79-
"strict": true, /* Enable all strict type-checking options. */
72+
"strict": true, /* Enable all strict type-checking options. */
8073
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
8174
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
8275
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
@@ -95,9 +88,11 @@
9588
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
9689
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
9790
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
98-
9991
/* Completeness */
10092
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
101-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
102-
}
93+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
94+
},
95+
"include": [
96+
"./src"
97+
]
10398
}

0 commit comments

Comments
 (0)