summaryrefslogtreecommitdiff
path: root/eslint.config.js
diff options
context:
space:
mode:
authorTaylor Mullen <[email protected]>2025-05-16 16:22:33 -0700
committerN. Taylor Mullen <[email protected]>2025-05-18 23:49:48 -0700
commit8b8fa6c1ae8e7e95e68d1166bfe28ca6b242577b (patch)
tree91fde5385e3e70f784d8ec6bbbd352f713dafa4f /eslint.config.js
parent3d74a7061e2e64d7d8f3850e913acf31b493bcf9 (diff)
Refactor: Convert copy_files.cjs to ES module syntax
- Converted scripts/copy_files.cjs to use ES module syntax (renaming to copy_files.js). - This change aligns with the project's preference for ES modules over CommonJS for better modernity and future-proofing. - Updated eslint.config.js to remove the .cjs override. - Adjusted scripts/build_package.sh to call the new .js file.
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/eslint.config.js b/eslint.config.js
index 668930f6..5483f8aa 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -154,34 +154,6 @@ export default tseslint.config(
},
},
},
- // Override for .cjs files to use CommonJS
- {
- files: ['**/*.cjs'],
- languageOptions: {
- sourceType: 'commonjs',
- globals: {
- ...globals.node, // Add all Node.js globals
- __dirname: 'readonly',
- __filename: 'readonly',
- exports: 'writable',
- module: 'readonly',
- require: 'readonly',
- },
- },
- rules: {
- // Disable rules that are not applicable to CommonJS
- '@typescript-eslint/no-require-imports': 'off',
- 'no-restricted-syntax': [
- 'error',
- // Keep other restricted syntaxes, but allow require for .cjs
- {
- selector: 'ThrowStatement > Literal:not([value=/^\\\\w+Error:/])',
- message:
- 'Do not throw string literals or non-Error objects. Throw new Error("...") instead.',
- },
- ],
- },
- },
// Prettier config must be last
prettierConfig,
// Custom eslint rules for this repo