summaryrefslogtreecommitdiff
path: root/eslint.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js28
1 files changed, 21 insertions, 7 deletions
diff --git a/eslint.config.js b/eslint.config.js
index 1d3d290..2ba7fbb 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -4,25 +4,39 @@ import tseslintParser from '@typescript-eslint/parser';
import prettier from 'eslint-config-prettier';
export default [
+ // Global ignores (apply first)
+ {
+ ignores: [
+ 'dist/**',
+ 'node_modules/**',
+ 'examples/verify-callback-example.ts',
+ 'examples/verify-callback.ts', // Ignore this file too
+ 'examples/generate-uri.ts' // Ignore this file too
+ ]
+ },
+ // Default JS rules for all JS/TS files
js.configs.recommended,
{
- ignores: ['dist/**/*', '*.d.ts', '*.js.map', '*.d.ts.map'],
- files: ['**/*.ts'],
+ // Apply TS rules specifically to .ts files within src and tests
+ files: ['src/**/*.ts'], // Adjusted to include tests
languageOptions: {
parser: tseslintParser,
parserOptions: {
- project: ['./tsconfig.json'],
+ project: ['./tsconfig.json'], // Apply project-based parsing only here
tsconfigRootDir: '.',
},
+ globals: { // Define Node.js globals if needed
+ NodeJS: true
+ }
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
- ...tseslint.configs.recommended.rules,
- ...prettier.rules,
- '@typescript-eslint/no-explicit-any': 'warn',
- 'no-undef': 'off',
+ ...tseslint.configs.recommended.rules, // Apply TS recommended rules
+ '@typescript-eslint/no-explicit-any': 'error', // Make this an error now
},
},
+ // Prettier rules (apply last)
+ prettier,
]; \ No newline at end of file