mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 17:39:24 +00:00

# Description of Changes There's no current linter running over our TypeScript code, which means we've got a bunch of dead code and other code smells around with nothing notifying us. This PR adds ESLint with the typescript-eslint plugin and enables the recommended settings as a starting point for us. I've disabled all of the failing rules for the scope of this PR, just to get linting running without causing a massive diff. I'll follow up with future PRs that enable the failing rules one by one. Also updates our version of TypeScript, which introduces a new type error in the code (which I've had to fix)
33 lines
1.4 KiB
JavaScript
33 lines
1.4 KiB
JavaScript
// @ts-check
|
|
|
|
import eslint from '@eslint/js';
|
|
import { defineConfig } from 'eslint/config';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
export default defineConfig(
|
|
eslint.configs.recommended,
|
|
tseslint.configs.recommended,
|
|
{
|
|
ignores: [
|
|
"dist", // Contains 3rd party code
|
|
"public", // Contains 3rd party code
|
|
],
|
|
},
|
|
{
|
|
rules: {
|
|
"no-empty": "off", // Temporarily disabled until codebase conformant
|
|
"no-empty-pattern": "off", // Temporarily disabled until codebase conformant
|
|
"no-undef": "off", // Temporarily disabled until codebase conformant
|
|
"no-useless-escape": "off", // Temporarily disabled until codebase conformant
|
|
"no-case-declarations": "off", // Temporarily disabled until codebase conformant
|
|
"prefer-const": "off", // Temporarily disabled until codebase conformant
|
|
"@typescript-eslint/ban-ts-comment": "off", // Temporarily disabled until codebase conformant
|
|
"@typescript-eslint/no-empty-object-type": "off", // Temporarily disabled until codebase conformant
|
|
"@typescript-eslint/no-explicit-any": "off", // Temporarily disabled until codebase conformant
|
|
"@typescript-eslint/no-require-imports": "off", // Temporarily disabled until codebase conformant
|
|
"@typescript-eslint/no-unused-expressions": "off", // Temporarily disabled until codebase conformant
|
|
"@typescript-eslint/no-unused-vars": "off", // Temporarily disabled until codebase conformant
|
|
},
|
|
}
|
|
);
|