Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add typescript-eslint #85

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .commitlintrc.cjs → .commitlintrc.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
extends: ['@commitlint/config-conventional'],
rules: {
// Sets the maximum length for commit messages. It accounts for a 3-digit PR
Expand Down
7 changes: 0 additions & 7 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .lintstagedrc.cjs → .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
'*.{cjs,js,jsx,ts,tsx}': [
'eslint --cache --fix --max-warnings 0',
'prettier --cache --write',
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.cjs → .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import("prettier").Config} */
module.exports = {
export default {
singleQuote: true,
};
2 changes: 1 addition & 1 deletion .stylelintrc.cjs → .stylelintrc.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
export default {
extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss'],
};
20 changes: 20 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.strict,
tseslint.configs.stylistic,
{ ignores: ['build', 'deprecated'] },
{
rules: {
eqeqeq: 'error',
'@typescript-eslint/no-empty-function': [
'error',
{ allow: ['arrowFunctions'] },
],
},
},
);
285 changes: 280 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"devDependencies": {
"@commitlint/cli": "^19.6.0",
"@commitlint/config-conventional": "^19.6.0",
"@eslint/js": "^9.15.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
Expand All @@ -37,7 +38,8 @@
"stylelint": "^16.11.0",
"stylelint-config-prettier-scss": "^1.0.0",
"stylelint-config-standard-scss": "^13.1.0",
"typescript": "^4.9.5"
"typescript": "^4.9.5",
"typescript-eslint": "^8.16.0"
},
"jest": {
"collectCoverageFrom": [
Expand Down
Loading