Skip to content

Commit cb3c84a

Browse files
authored
feat: add typescript-eslint (#85)
1 parent a762a86 commit cb3c84a

13 files changed

+357
-57
lines changed

.commitlintrc.cjs .commitlintrc.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
extends: ['@commitlint/config-conventional'],
33
rules: {
44
// Sets the maximum length for commit messages. It accounts for a 3-digit PR

.eslintrc.cjs

-7
This file was deleted.

.lintstagedrc.cjs .lintstagedrc.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
'*.{cjs,js,jsx,ts,tsx}': [
33
'eslint --cache --fix --max-warnings 0',
44
'prettier --cache --write',

.prettierrc.cjs .prettierrc.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/** @type {import("prettier").Config} */
2-
module.exports = {
2+
export default {
33
singleQuote: true,
44
};

.stylelintrc.cjs .stylelintrc.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module.exports = {
1+
export default {
22
extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss'],
33
};

eslint.config.mjs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
6+
export default tseslint.config(
7+
eslint.configs.recommended,
8+
tseslint.configs.strict,
9+
tseslint.configs.stylistic,
10+
{ ignores: ['build', 'deprecated'] },
11+
{
12+
rules: {
13+
eqeqeq: 'error',
14+
'@typescript-eslint/no-empty-function': [
15+
'error',
16+
{ allow: ['arrowFunctions'] },
17+
],
18+
},
19+
},
20+
);

package-lock.json

+280-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"devDependencies": {
2121
"@commitlint/cli": "^19.6.0",
2222
"@commitlint/config-conventional": "^19.6.0",
23+
"@eslint/js": "^9.15.0",
2324
"@testing-library/jest-dom": "^6.6.3",
2425
"@testing-library/react": "^16.0.1",
2526
"@testing-library/user-event": "^14.5.2",
@@ -37,7 +38,8 @@
3738
"stylelint": "^16.11.0",
3839
"stylelint-config-prettier-scss": "^1.0.0",
3940
"stylelint-config-standard-scss": "^13.1.0",
40-
"typescript": "^4.9.5"
41+
"typescript": "^4.9.5",
42+
"typescript-eslint": "^8.16.0"
4143
},
4244
"jest": {
4345
"collectCoverageFrom": [

0 commit comments

Comments
 (0)