Skip to content

Commit 77f0145

Browse files
committed
fix: proper configuration for xo (lint only js files)
1 parent 66e9720 commit 77f0145

File tree

8 files changed

+154
-221
lines changed

8 files changed

+154
-221
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ jobs:
6363
node-version: 22
6464
cache: 'yarn'
6565

66+
- name: Install dependencies
67+
run: yarn install --immutable
68+
6669
- name: "Release"
67-
id: "release"
68-
uses: codfish/[email protected]
6970
env:
7071
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
7172
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
73+
run: yarn semantic-release

.releaserc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"branches": [
3+
"master"
4+
],
5+
"plugins": [
6+
[
7+
"@semantic-release/exec",
8+
{
9+
"prepareCmd": "yarn pinst --disable"
10+
}
11+
],
12+
"@semantic-release/commit-analyzer",
13+
"@semantic-release/release-notes-generator",
14+
"@semantic-release/npm",
15+
"@semantic-release/github"
16+
]
17+
}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<div align="center">
22

3-
<!-- eslint-disable-next-line @stylistic/indent -->
4-
5-
@react-hookz/eslint-config
3+
# @react-hookz/eslint-config
64

75
eslint configuration files used in @react-hookz projects
86

7+
[![NPM Version](https://flat.badgen.net/npm/v/@react-hookz/eslint-config)](https://www.npmjs.com/package/@react-hookz/eslint-config)
8+
[![NPM Downloads](https://flat.badgen.net/npm/dm/@react-hookz/eslint-config)](https://www.npmjs.com/package/@react-hookz/eslint-config)
9+
[![NPM Dependents](https://flat.badgen.net/npm/dependents/@react-hookz/eslint-config)](https://www.npmjs.com/package/@react-hookz/eslint-config)
910
[![Build](https://img.shields.io/github/actions/workflow/status/react-hookz/eslint-config/CI.yml?branch=master&style=flat-square)](https://github.com/react-hookz/eslint-config/actions)
1011

1112
</div>

configs/base.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ const baseConfig = [
239239
},
240240
},
241241

242-
...xo,
242+
{
243+
...xo[0],
244+
files: ['*.{js,mjs,cjs,ts,tsx,jsx}'],
245+
},
243246
{
244247
rules: {
245248
// annoying rules

configs/.prettierrc.js renamed to configs/prettier.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = {
22
printWidth: 100,
3-
tabs: true,
3+
useTabs: true,
44
tabWidth: 2,
55
semi: true,
66
singleQuote: true,

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
},
2828
"dependencies": {
2929
"@eslint/js": "^9.15.0",
30-
"@eslint/markdown": "^6.2.1",
3130
"@typescript-eslint/eslint-plugin": "^8.15.0",
3231
"@typescript-eslint/parser": "^8.15.0",
3332
"@vitest/eslint-plugin": "^1.1.10",
@@ -49,10 +48,12 @@
4948
"@commitlint/cli": "^19.6.0",
5049
"@commitlint/config-conventional": "^19.6.0",
5150
"@react-hookz/eslint-formatter-gha": "^2.0.1",
51+
"@semantic-release/exec": "^6.0.3",
5252
"eslint": "^9.15.0",
5353
"eslint-plugin-prettier": "^5.2.1",
5454
"husky": "^9.1.7",
5555
"lint-staged": "^15.2.10",
56+
"pinst": "^3.0.0",
5657
"prettier": "^3.3.3",
5758
"semantic-release": "^24.2.0"
5859
},

prettier.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default } from './configs/.prettierrc.js';
1+
export { default } from './configs/prettier.config.js';

0 commit comments

Comments
 (0)