Skip to content

Commit

Permalink
feat: add typescript-eslint (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalston authored Dec 1, 2024
1 parent a762a86 commit cb3c84a
Show file tree
Hide file tree
Showing 13 changed files with 357 additions and 57 deletions.
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

0 comments on commit cb3c84a

Please sign in to comment.