Skip to content

Commit

Permalink
chore: fix build and bump eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
imranbarbhuiya committed Jan 13, 2025
1 parent 86a3b36 commit c026b4a
Show file tree
Hide file tree
Showing 7 changed files with 2,905 additions and 2,033 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"editor.detectIndentation": false,
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"cSpell.words": ["Alnum", "decancer"],
"editor.formatOnSave": true
Expand Down
30 changes: 30 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import common from 'eslint-config-mahir/common';
import edge from 'eslint-config-mahir/edge';
import node from 'eslint-config-mahir/node';
import tsdoc from 'eslint-config-mahir/tsdoc';
import typescript from 'eslint-config-mahir/typescript';

/**
* @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray}

Check warning on line 8 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Linting

tsdoc-undefined-tag: The TSDoc tag "@type" is not defined in this configuration

Check warning on line 8 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Linting

tsdoc-malformed-inline-tag: Expecting a TSDoc tag starting with "{@"

Check warning on line 8 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Linting

tsdoc-at-sign-in-word: The "@" character looks like part of a TSDoc tag; use a backslash to escape it

Check warning on line 8 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Linting

tsdoc-escape-right-brace: The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
*/
export default [
...common,
...node,
...typescript,
...edge,
...tsdoc,
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['eslint.config.mjs', 'tsup.config.ts', 'vitest.config.ts'],
defaultProject: 'tsconfig.eslint.json',
},
tsconfigRootDir: import.meta.dirname,
},
},
},
{
ignores: ['.github', '.yarn', 'dist'],
},
];
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "@imranbarbhuiya",
"scripts": {
"docs": "typedoc",
"lint": "eslint src tests --fix",
"lint": "eslint . --cache --fix",
"format": "prettier --write \"{src,tests}/**/*.ts\"",
"test": "vitest run",
"test:watch": "vitest",
Expand Down Expand Up @@ -48,8 +48,8 @@
"@types/unidecode": "^0.1.3",
"@vitest/coverage-v8": "^2.1.8",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.57.1",
"eslint-config-mahir": "^0.0.46",
"eslint": "^9.18.0",
"eslint-config-mahir": "^1.0.7",
"husky": "^9.1.7",
"jsdom": "^26.0.0",
"lint-staged": "^15.3.0",
Expand Down Expand Up @@ -79,7 +79,7 @@
]
},
"lint-staged": {
"*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts"
"*.{mjs,js,ts}": "eslint --fix"
},
"config": {
"commitizen": {
Expand Down
1 change: 0 additions & 1 deletion tests/browser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe('browser-bundle-test', () => {

declare global {
interface Window {
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
decancer: typeof import('../src');
}
}
Loading

0 comments on commit c026b4a

Please sign in to comment.