From 219df85430035c00c9de43a549d24a217fb10cb0 Mon Sep 17 00:00:00 2001 From: Matthew Holder Date: Wed, 14 Aug 2024 17:08:31 -0500 Subject: [PATCH 1/2] Made using ESLint and Prettier separately possible - Upgrade many dependencies. - Cleaned-up the TSConfig. - Added a separately referenceable Prettier config. - Reverted the arrow parentheses to default. - Added the `usePrettier` config support function. - The Prettier component is no longer force-enabled in the ESLint rules. - Removed unnecessary dependency requirements for the JavaScript component. - Disabled the `no-confusing-arrow` rule since it doesn't play well with Prettier. --- .husky/pre-commit | 3 - .vscode/launch.json | 2 +- .vscode/tasks.json | 30 ++++----- README.md | 20 +++++- package.json | 34 ++++++---- prettier.config.cjs | 11 ++++ prettier.config.d.cts | 6 ++ src/components/extend.cts | 4 +- src/components/import.cts | 6 +- src/components/javascript.cts | 5 +- src/components/prettier.cts | 11 +--- src/core/legacy.cts | 2 +- src/core/logging.cts | 14 ++-- src/core/system.cts | 10 ++- src/managers/npm.cts | 2 +- src/managers/pnpm.cts | 2 +- src/managers/yarn.cts | 2 +- tsconfig.json | 117 +++------------------------------- 18 files changed, 110 insertions(+), 171 deletions(-) create mode 100644 prettier.config.cjs create mode 100644 prettier.config.d.cts diff --git a/.husky/pre-commit b/.husky/pre-commit index 1710762..0ef3dcf 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,2 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - yarn build yarn lint diff --git a/.vscode/launch.json b/.vscode/launch.json index e3a20a8..adc51a9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,7 +7,7 @@ "name": "Launch Program", "skipFiles": ["/**"], "runtimeExecutable": "yarn", - "runtimeArgs": ["eslint", "."], + "runtimeArgs": ["eslint", "."] } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 76b715b..db9d154 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,22 +1,22 @@ { - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "build", + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "build", "group": { "kind": "build", "isDefault": true }, - "label": "npm: build", - "detail": "tsc --build" - }, - { - "type": "npm", - "script": "rebuild", + "label": "npm: build", + "detail": "tsc --build" + }, + { + "type": "npm", + "script": "rebuild", "group": "build", - "label": "npm: rebuild", - "detail": "npm clean && npm build" - } - ] + "label": "npm: rebuild", + "detail": "npm clean && npm build" + } + ] } diff --git a/README.md b/README.md index 208853c..2184ab3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ -# Quick and Easy Opinionated ESLint Setup +# Quick and Easy Opinionated Linting Setup + +## ESLint Provides a strict, quick, and easy to setup opinionated ESLint rule set for; + - JavaScript - TypeScript - Node.js @@ -31,16 +34,29 @@ module.exports = defineConfig(({ useNode, useTypeScript }) => { ``` Support function from `defineConfig`. + +- `usePrettier` - `useNode` - `useTypeScript` - `useVue` JavaScript is always supported by default. -The following ESLint plug-ins are: +The following ESLint plug-ins are used: + - `prettier` - `n` - `import` - `promise` - `typescript` - `vue` + +## Prettier + +Provides a compatible opinionated Prettier configuration to run Prettier separately. + +Simply add a `prettier.config.cjs` with the following contents: + +```js +module.exports = require('@sixxgate/lint/prettier.config.cjs') +``` diff --git a/package.json b/package.json index 803fa23..7a66dae 100644 --- a/package.json +++ b/package.json @@ -13,14 +13,18 @@ "access": "public" }, "scripts": { - "rebuild": "run-s clean build", - "build": "run-p compile copy", + "rebuild": "run-s -l clean build", + "build": "run-p -l compile copy", "compile": "tsc", "copy": "cpy 'src/**/*.{js,jsx,cjs,mjs,d.ts,d.tsx,d.cts,d.mts}' dist/", "clean": "del dist/", - "lint": "eslint .", - "fix": "eslint --fix .", - "prepare": "husky install", + "lint:eslint": "eslint .", + "lint:prettier": "prettier -cu .", + "lint": "run-p -l 'lint:*'", + "fix:eslint": "eslint --fix .", + "fix:prettier": "prettier -cu --write .", + "fix": "run-s -l 'fix:*'", + "prepare": "husky", "prepack": "yarn run rebuild" }, "files": [ @@ -34,18 +38,20 @@ "dist/**/*.mjs", "dist/**/*.js.map", "dist/**/*.cjs.map", - "dist/**/*.mjs.map" + "dist/**/*.mjs.map", + "prettier.config.cjs" ], "peerDependencies": { "eslint": "^8.52.0" }, "devDependencies": { "@tsconfig/node18": "^18.2.4", + "@tsconfig/strictest": "^2.0.5", "@types/debug": "^4.1.12", "@types/lodash": "^4.17.7", - "@types/node": "18.19.43", - "@typescript-eslint/eslint-plugin": "^7.18.0", - "@typescript-eslint/parser": "^7.18.0", + "@types/node": "18.19.44", + "@typescript-eslint/eslint-plugin": "^8.1.0", + "@typescript-eslint/parser": "^8.1.0", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "cpy-cli": "^5.0.0", @@ -54,12 +60,12 @@ "eslint-import-resolver-node": "^0.3.9", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-n": "^16.6.2", + "eslint-plugin-n": "^17.10.2", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-promise": "^6.6.0", + "eslint-plugin-promise": "^7.1.0", "eslint-plugin-vue": "^9.27.0", - "husky": "^8.0.3", - "npm-check-updates": "^17.0.1", + "husky": "^9.1.4", + "npm-check-updates": "^17.0.6", "npm-run-all2": "^6.2.2", "prettier": "^3.3.3", "typescript": "^5.5.4", @@ -80,7 +86,7 @@ "radash": "^12.1.0", "read-pkg": "^5.2.0", "tslib": "^2.6.3", - "type-fest": "^4.23.0", + "type-fest": "^4.24.0", "zod": "^3.23.8" } } diff --git a/prettier.config.cjs b/prettier.config.cjs new file mode 100644 index 0000000..8024888 --- /dev/null +++ b/prettier.config.cjs @@ -0,0 +1,11 @@ +/** @type {import('prettier').Config} */ +const config = { + semi: false, + singleQuote: true, + quoteProps: 'consistent', + trailingComma: 'none', + bracketSameLine: true, + printWidth: 120 +} + +module.exports = config diff --git a/prettier.config.d.cts b/prettier.config.d.cts new file mode 100644 index 0000000..1d60674 --- /dev/null +++ b/prettier.config.d.cts @@ -0,0 +1,6 @@ +import type { Config } from 'prettier' + +/** @type {import('prettier').Config} */ +const config: Config + +export = config diff --git a/src/components/extend.cts b/src/components/extend.cts index ea8d20d..bbe46d3 100644 --- a/src/components/extend.cts +++ b/src/components/extend.cts @@ -9,7 +9,7 @@ const BaseSpec = z.union([ z .string() .min(1) - .transform(value => [value]), + .transform((value) => [value]), z.array(z.string().min(1)).transform(uniq) ]) @@ -20,7 +20,7 @@ const ExtendOptions = z }) .partial() -const Options = z.union([BaseSpec.transform(before => ExtendOptions.parse({ before })), ExtendOptions]).default({}) +const Options = z.union([BaseSpec.transform((before) => ExtendOptions.parse({ before })), ExtendOptions]).default({}) type Options = z.input diff --git a/src/components/import.cts b/src/components/import.cts index 204f274..8d5db44 100644 --- a/src/components/import.cts +++ b/src/components/import.cts @@ -67,7 +67,7 @@ const ImportComponent = Object.assign( function getDependencies() { return [ 'eslint-plugin-import', - ...Array.from(settings.resolvers).map(resolver => `eslint-import-resolver-${resolver}`) + ...Array.from(settings.resolvers).map((resolver) => `eslint-import-resolver-${resolver}`) ] } @@ -87,7 +87,9 @@ const ImportComponent = Object.assign( ), 'import/extensions': Array.from(settings.extensions), 'import/external-module-folders': Array.from(settings.externalModuleFolders), - 'import/resolver': Object.fromEntries(Array.from(settings.resolvers).map(resolver => [resolver, true] as const)) + 'import/resolver': Object.fromEntries( + Array.from(settings.resolvers).map((resolver) => [resolver, true] as const) + ) } config.rules = { diff --git a/src/components/javascript.cts b/src/components/javascript.cts index b59a2d3..277ea07 100644 --- a/src/components/javascript.cts +++ b/src/components/javascript.cts @@ -55,7 +55,6 @@ function getStandardJavaScriptRules(): Linter.RulesRecord { 'no-alert': 'error', 'no-array-constructor': 'error', 'no-caller': 'error', - 'no-confusing-arrow': 'error', 'no-div-regex': 'error', 'no-else-return': 'warn', 'no-empty-function': 'warn', @@ -137,7 +136,7 @@ const JavaScriptComponent = Object.assign( // But, include it anyways to keep thing normal in case // this program moves to flat configuration or can // eventually use dynamic imports. - return ['eslint', '@eslint/eslintrc', '@eslint/js'] + return ['eslint'] } function getPrecedingComponents() { @@ -145,7 +144,7 @@ const JavaScriptComponent = Object.assign( } function preConfigure() { - getComponent(ExtendComponent).extend('eslint:recommended') + getComponent(ExtendComponent).extend({ before: 'eslint:recommended', after: 'prettier' }) const theImportComponent = getComponent(ImportComponent) theImportComponent.enableResolver('node') diff --git a/src/components/prettier.cts b/src/components/prettier.cts index 93bf9db..488e53c 100644 --- a/src/components/prettier.cts +++ b/src/components/prettier.cts @@ -1,3 +1,4 @@ +import baseConfig from '../../prettier.config.cjs' import { defineComponent } from '../core/components.cjs' import useLegacyConfig from '../core/legacy.cjs' import ExtendComponent from './extend.cjs' @@ -9,13 +10,7 @@ function getStandardPrettierRules(): Linter.RulesRecord { 'warn', { editorconfig: true, - semi: false, - singleQuote: true, - quoteProps: 'consistent', - trailingComma: 'none', - bracketSameLine: true, - arrowParens: 'avoid', - printWidth: 120 + ...baseConfig } ] } @@ -38,7 +33,7 @@ const PrettierComponent = Object.assign( } function preConfigure() { - getComponent(ExtendComponent).extend({ after: ['plugin:prettier/recommended', 'prettier'] }) + getComponent(ExtendComponent).extend({ after: ['plugin:prettier/recommended'] }) } function configure(config: Linter.Config) { diff --git a/src/core/legacy.cts b/src/core/legacy.cts index 38715be..d3fc504 100644 --- a/src/core/legacy.cts +++ b/src/core/legacy.cts @@ -38,7 +38,7 @@ const useLegacyConfig = shared(() => { return legacy .extends(...names) - .map(config => (config.rules != null ? shake(config.rules) : null)) + .map((config) => (config.rules != null ? shake(config.rules) : null)) .reduce((prev, rules) => ({ ...prev, ...rules }), {}) } diff --git a/src/core/logging.cts b/src/core/logging.cts index a70011f..bf3ea60 100644 --- a/src/core/logging.cts +++ b/src/core/logging.cts @@ -7,15 +7,15 @@ import type { ValuesOf } from '../helpers/types.cjs' import type { ChalkFunction } from 'chalk' import type { ConditionalKeys } from 'type-fest' -const kDebugNamespace = 'lint-config' -const kLevels = Object.seal(['debug', 'info', 'log', 'warn', 'error'] as const) +export const kDebugNamespace = 'lint-config' +export const kLevels = Object.seal(['debug', 'info', 'log', 'warn', 'error'] as const) -type Levels = ValuesOf -type LineFormatter = (message?: unknown, ...optionalParams: unknown[]) => [unknown?, ...unknown[]] -type LineWriter = (message?: unknown, ...optionalParams: unknown[]) => void -type ConsoleWriter = (typeof console)[Levels] +export type Levels = ValuesOf +export type LineFormatter = (message?: unknown, ...optionalParams: unknown[]) => [unknown?, ...unknown[]] +export type LineWriter = (message?: unknown, ...optionalParams: unknown[]) => void +export type ConsoleWriter = (typeof console)[Levels] -interface LevelSettings { +export interface LevelSettings { level: Levels style: ChalkFunction hideLevel?: boolean | undefined diff --git a/src/core/system.cts b/src/core/system.cts index 4fe398a..cbf5e45 100644 --- a/src/core/system.cts +++ b/src/core/system.cts @@ -40,6 +40,10 @@ export function useDefineConfigApi(isolate: Isolate) { theExtendComponent.extend(base, ...more) } + function usePrettier(...args: ArgsFromFactory) { + thePrettierComponent.enable(...args) + } + function useNode(...args: ArgsFromFactory) { theNodeComponent.enable(...args) } @@ -56,7 +60,6 @@ export function useDefineConfigApi(isolate: Isolate) { theJavaScriptComponent.enable() theImportComponent.enable() thePromiseComponent.enable() - thePrettierComponent.enable() return { // Extending lint @@ -67,6 +70,7 @@ export function useDefineConfigApi(isolate: Isolate) { findPackageManager, // Components extend, + usePrettier, useNode, useTypeScript, useVue @@ -108,12 +112,12 @@ export function defineConfig(callback: (api: DefineConfigApi) => Linter.Config) for (const component of components) { if (component.enabled) { logger.debug(`Checking dependencies for "${component.name}"`) - dependencies.push(...component.dependencies.filter(dependency => !pm.has(dependency))) + dependencies.push(...component.dependencies.filter((dependency) => !pm.has(dependency))) } } if (dependencies.length > 0) { - logger.info(`Installing dependencies ${dependencies.map(dependency => `"${dependency}"`).join(', ')}`) + logger.info(`Installing dependencies ${dependencies.map((dependency) => `"${dependency}"`).join(', ')}`) pm.add(dependencies) logger.warn('You must re-run ESLint to use newly installed dependencies.') diff --git a/src/managers/npm.cts b/src/managers/npm.cts index d245227..c464156 100644 --- a/src/managers/npm.cts +++ b/src/managers/npm.cts @@ -4,7 +4,7 @@ import { run } from '../helpers/system.cjs' const NodePackageManager = definePackageManager('npm', () => ({ executables: ['npm', 'npm.js', 'npm.cmd', 'npm.ps1', 'npm-cli.js'], lockFileNames: ['package-lock.json', 'npm-shrinkwrap.json'], - add: names => { + add: (names) => { run('npm', 'install', '--save-dev', '--legacy-peer-deps', ...names) } })) diff --git a/src/managers/pnpm.cts b/src/managers/pnpm.cts index dfee585..228ad36 100644 --- a/src/managers/pnpm.cts +++ b/src/managers/pnpm.cts @@ -4,7 +4,7 @@ import { run } from '../helpers/system.cjs' const PerformantNodePackageManager = definePackageManager('pnpm', () => ({ executables: ['pnpm', 'pnpm.cmd', 'pnpm.cjs'], lockFileNames: ['pnpm-lock.yaml'], - add: names => { + add: (names) => { run('pnpm', 'add', '--save-dev', ...names) } })) diff --git a/src/managers/yarn.cts b/src/managers/yarn.cts index 7acd345..c8d39b7 100644 --- a/src/managers/yarn.cts +++ b/src/managers/yarn.cts @@ -4,7 +4,7 @@ import { run } from '../helpers/system.cjs' const YarnPackageManager = definePackageManager('yarn', () => ({ executables: ['yarn', 'yarn.cmd', 'yarn.js'], lockFileNames: ['yarn.lock'], - add: names => { + add: (names) => { run('yarn', 'add', '--dev', ...names) } })) diff --git a/tsconfig.json b/tsconfig.json index 7f95580..5294e7c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,111 +1,14 @@ { - "extends": "@tsconfig/node18", - "include": ["src/**/*.ts", "src/**/*.cts", "src/**/*.mts"], + "extends": ["@tsconfig/strictest", "@tsconfig/node18"], + "include": ["src/**/*.ts", "src/**/*.cts", "src/**/*.mts", "prettier.config.d.cts"], "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - // "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - // "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "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. */ - "outDir": "./dist", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - // "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - // "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - // "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "incremental": true, + "declaration": true, + "sourceMap": true, + "outDir": "./dist", + "importHelpers": true, + "noEmitHelpers": true, + "noEmitOnError": true, + "isolatedModules": true } } From 48e2b1584b0e32edbaaaf1d0ee753aebd0d303ec Mon Sep 17 00:00:00 2001 From: Matthew Holder Date: Wed, 14 Aug 2024 17:14:29 -0500 Subject: [PATCH 2/2] Updated the Version Numbers --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a66dae..9604093 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sixxgate/lint", - "version": "3.1.4", + "version": "3.2.0", "packageManager": "yarn@1.22.22", "main": "dist/index.cjs", "author": "Matthew Holder ",