Skip to content

Commit

Permalink
feat: add isolatedModules as default tsconfig.base.json
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Oct 22, 2024
1 parent 7df995f commit b2908e0
Show file tree
Hide file tree
Showing 9 changed files with 836 additions and 856 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-pets-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/eslint-config-hyperse": minor
---

add `isolatedModules` as default tsconfig.base.json
2 changes: 1 addition & 1 deletion .ncurc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dep": "prod,dev,bundle,optional",
"reject": []
"reject": ["eslint-plugin-sonarjs"]
}
725 changes: 367 additions & 358 deletions .yarn/releases/yarn-4.5.0.cjs → .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.0.cjs
yarnPath: .yarn/releases/yarn-4.5.1.cjs
52 changes: 28 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,54 +67,58 @@
"path": "cz-conventional-changelog"
}
},
"resolutions": {
"eslint-plugin-markdown": "5.1.0"
},
"dependencies": {
"@eslint/js": "^9.9.0",
"@eslint/js": "^9.13.0",
"@next/eslint-plugin-next": "rc",
"@vitest/eslint-plugin": "^1.0.1",
"@typescript-eslint/utils": "^8.11.0",
"@vitest/eslint-plugin": "^1.1.7",
"app-root-path": "^3.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "beta",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sonarjs": "^1.0.4",
"eslint-plugin-tailwindcss": "^3.17.4",
"get-tsconfig": "^4.7.6",
"globals": "^15.9.0",
"eslint-plugin-tailwindcss": "^3.17.5",
"get-tsconfig": "^4.8.1",
"globals": "^15.11.0",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.9",
"typescript-eslint": "^8.0.1"
"tailwindcss": "^3.4.14",
"typescript-eslint": "^8.11.0"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.7",
"@commitlint/cli": "19.4.0",
"@commitlint/config-conventional": "19.2.2",
"@swc/core": "^1.7.10",
"@changesets/cli": "2.27.9",
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@swc/core": "^1.7.36",
"@types/eslint__js": "^8.42.3",
"@types/node": "22.2.0",
"@types/react": "^18.3.3",
"commitizen": "4.3.0",
"@types/node": "22.7.8",
"@types/react": "^18.3.11",
"commitizen": "4.3.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "^9.9.0",
"husky": "9.1.4",
"lint-staged": "15.2.8",
"eslint": "^9.13.0",
"husky": "9.1.6",
"lint-staged": "15.2.10",
"rimraf": "6.0.1",
"tsup": "^8.2.4",
"tsx": "^4.17.0",
"typescript": "5.5.4",
"vitest": "2.0.5"
"tsup": "^8.3.0",
"tsx": "^4.19.1",
"typescript": "5.6.3",
"vitest": "2.1.3"
},
"peerDependencies": {
"eslint": ">=9.3.0",
"typescript": "^5.4.3"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=20.0.0"
},
"packageManager": "[email protected]"
}
}
6 changes: 5 additions & 1 deletion tests/eslint.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import type { A } from './type.js';
import { b } from './type.js';

describe('ESLint', () => {
describe('ESLint', () => {
const a: A = b;
it('should pass ESLint', () => {
expect(true).toBe(true);
expect(a).toMatchObject({ a: '1' });
});
});
});
7 changes: 7 additions & 0 deletions tests/type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export type A = {
a: string;
};

export const b: A = {
a: '1',
};
1 change: 1 addition & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"resolveJsonModule": true,
"incremental": true,
"declaration": true,
"isolatedModules": true,
"newLine": "lf",
"baseUrl": ".",
"rootDir": ".",
Expand Down
Loading

0 comments on commit b2908e0

Please sign in to comment.