diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..577eb860 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +dist +node_modules +package-lock.json +*.md +*.min.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..284a9f46 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,46 @@ +const tsRules = { + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-empty-interface": "off" +} + +module.exports = { + env: { + node: true, + browser: true, + }, + extends: ['eslint:recommended', 'plugin:astro/recommended'], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + rules: { + "no-unused-vars": "off" + }, + overrides: [ + { + files: ['*.astro'], + parser: 'astro-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + extraFileExtensions: ['.astro'], + }, + rules: { + ...tsRules + }, + }, + { + files: ['*.ts'], + parser: '@typescript-eslint/parser', + extends: ['plugin:@typescript-eslint/recommended'], + rules: { + ...tsRules + }, + }, + { + // Define the configuration for `