diff --git a/.oxfmtignore b/.oxfmtignore deleted file mode 100644 index 2741948..0000000 --- a/.oxfmtignore +++ /dev/null @@ -1,16 +0,0 @@ -# Что oxfmt не форматирует. -# -# oxfmt умеет не только js: без этого списка он переписывает package.json, -# markdown и yaml воркфлоу. Их ведут другие инструменты, поэтому оставляем -# oxfmt только js. -node_modules/ -coverage/ -dist/ -build/ -*.json -*.jsonc -*.md -*.yml -*.yaml -*.css -*.html diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..6982425 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,15 @@ +{ + "ignorePatterns": [ + "node_modules/", + "coverage/", + "dist/", + "build/", + "*.json", + "*.jsonc", + "*.md", + "*.yml", + "*.yaml", + "*.css", + "*.html" + ] +} diff --git a/Makefile b/Makefile index 533a3f2..fc8b194 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,10 @@ test-coverage: npm test -- --coverage lint: - npx oxlint && npx oxfmt --ignore-path=.oxfmtignore --check + npx oxlint && npx oxfmt --check lint-fix: - npx oxfmt --ignore-path=.oxfmtignore && npx oxlint --fix + npx oxfmt && npx oxlint --fix publish: npx release-it diff --git a/package.json b/package.json index 72feae3..68c39df 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "test": "vitest run", "test:watch": "vitest", "test:coverage": "vitest run --coverage", - "lint": "oxlint && oxfmt --ignore-path=.oxfmtignore --check", - "lint:fix": "oxfmt --ignore-path=.oxfmtignore && oxlint --fix" + "lint": "oxlint && oxfmt --check", + "lint:fix": "oxfmt && oxlint --fix" }, "repository": { "type": "git", @@ -34,7 +34,7 @@ }, "lint-staged": { "*.js": [ - "oxfmt --ignore-path=.oxfmtignore", + "oxfmt", "oxlint --fix" ] },