diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 3385fe0..0000000 --- a/.editorconfig +++ /dev/null @@ -1,11 +0,0 @@ -; http://editorconfig.org - -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 649f132..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "all", - "tabWidth": 4, - "overrides": [ - { - "files": ["*.json", "*.yml"], - "options": { - "tabWidth": 2 - } - } - ] -} diff --git a/eslint.config.js b/eslint.config.js index 30aa733..b940db0 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,22 +1,3 @@ -import prettierConfig from 'eslint-config-prettier'; -import prettierPlugin from 'eslint-plugin-prettier/recommended'; -import globals from 'globals'; -import js from '@eslint/js'; +import config from "@eik/eslint-config"; -export default [ - js.configs.recommended, - prettierConfig, - prettierPlugin, - { - languageOptions: { - globals: { - ...globals.node, - ...globals.browser, - global: true, - }, - }, - }, - { - ignores: ['coverage/*', 'dist/*'], - }, -]; +export default config; diff --git a/package.json b/package.json index 15ba37b..293823f 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,10 @@ "scripts": { "lint": "eslint .", "lint:fix": "eslint --fix .", - "test": "run-s test:*", - "test:unit": "tap --disable-coverage --allow-empty-coverage tests/**/*.js", - "test:types": "tsc --project tsconfig.test.json", - "types": "tsc --declaration --emitDeclarationOnly" + "test": "tap --disable-coverage --allow-empty-coverage tests/**/*.js", + "types": "run-s types:module types:test", + "types:module": "tsc", + "types:test": "tsc --project tsconfig.test.json" }, "repository": { "type": "git", @@ -38,15 +38,15 @@ "@metrics/client": "2.5.3" }, "devDependencies": { - "@semantic-release/changelog": "6.0.3", - "@semantic-release/git": "10.0.1", - "eslint": "9.1.1", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-prettier": "5.1.3", - "globals": "15.0.0", + "@eik/eslint-config": "1.0.0", + "@eik/prettier-config": "1.0.1", + "@eik/semantic-release-config": "1.0.0", + "@eik/typescript-config": "1.0.0", + "eslint": "9.8.0", "npm-run-all": "4.1.5", - "prettier": "3.3.2", + "prettier": "3.3.3", "semantic-release": "24.0.0", - "tap": "18.8.0" + "tap": "18.8.0", + "typescript": "5.5.4" } } diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..8983a3c --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,3 @@ +import config from "@eik/prettier-config"; + +export default config; diff --git a/release.config.cjs b/release.config.cjs deleted file mode 100644 index 8329b44..0000000 --- a/release.config.cjs +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - plugins: [ - '@semantic-release/commit-analyzer', - '@semantic-release/release-notes-generator', - '@semantic-release/changelog', - [ - '@semantic-release/npm', - { - tarballDir: 'release', - }, - ], - [ - '@semantic-release/github', - { - assets: 'release/*.tgz', - }, - ], - '@semantic-release/git', - ], - preset: 'angular', -}; diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000..dd5cd51 --- /dev/null +++ b/release.config.js @@ -0,0 +1,3 @@ +export default { + extends: "@eik/semantic-release-config", +}; diff --git a/tsconfig.json b/tsconfig.json index 574a3cf..d29c97d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,7 @@ { + "extends": "@eik/typescript-config/module.json", + "include": ["./lib/**/*.js"], "compilerOptions": { - "lib": ["es2020", "DOM"], - "module": "nodenext", - "target": "es2020", - "resolveJsonModule": true, - "checkJs": true, - "allowJs": true, - "moduleResolution": "nodenext", - "declaration": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, "outDir": "types" - }, - "include": ["./lib/**/*.js"] + } } diff --git a/tsconfig.test.json b/tsconfig.test.json index 801ba2e..6b7cbeb 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -1,9 +1,4 @@ { - "extends": "./tsconfig.json", - "include": ["./tests/**/*.js"], - "compilerOptions": { - "module": "nodenext", - "moduleResolution": "nodenext", - "noEmit": true - } + "extends": "@eik/typescript-config/test.json", + "include": ["./tests/**/*.js"] }