diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8927e2c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..a7af2a5 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +dist +node_modules +.github +types.generated.d.ts \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..296d99a --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,53 @@ +/** @type {import("eslint").Linter.Config} */ +module.exports = { + env: { + node: true, + es2022: true, + browser: true, + }, + extends: ['eslint:recommended', 'plugin:astro/recommended'], + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: __dirname, + ecmaVersion: 'latest', + sourceType: 'module', + }, + rules: {}, + overrides: [ + { + files: ['*.js'], + rules: { + 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], + }, + }, + { + files: ['*.astro'], + parser: 'astro-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + extraFileExtensions: ['.astro'], + }, + rules: { + 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'], + }, + }, + { + files: ['*.ts'], + parser: '@typescript-eslint/parser', + extends: ['plugin:@typescript-eslint/recommended'], + rules: { + '@typescript-eslint/no-unused-vars': [ + 'error', + { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }, + ], + '@typescript-eslint/no-non-null-assertion': 'off', + }, + }, + { + // Define the configuration for ` + +
+ + + +