-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrated packages to eslint v9 (#23)
* feat: migrated packages to eslint v9 * chore: moved Readme to packages * refactor: removed unwanted config
- Loading branch information
1 parent
4b98289
commit 90d7e28
Showing
39 changed files
with
437 additions
and
1,390 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// @ts-check | ||
|
||
import { baseConfigs, nodeConfigs } from "@organization/eslint-config"; | ||
|
||
export default [ | ||
...baseConfigs, | ||
...nodeConfigs, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/package.json", | ||
"name": "@organization/eslint-config", | ||
"version": "0.0.0", | ||
"description": "Default EsLint Configuration for Packages", | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"node": "./dist/index.cjs", | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.mjs" | ||
} | ||
}, | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"format": "prettier ./src/**/* --write", | ||
"format:check": "prettier ./src/**/* --check", | ||
"build": "tsup", | ||
"dev": "tsup --watch", | ||
"clear": "rimraf dist", | ||
"clear:all": "rimraf dist node_modules", | ||
"typecheck:src": "tsc -p ./tsconfig.json --noEmit" | ||
}, | ||
"keywords": [], | ||
"author": { | ||
"email": "contact@jhasuraj.com", | ||
"name": "Suraj Jha", | ||
"url": "https://jhasuraj.com" | ||
}, | ||
"contributors": [], | ||
"license": "MIT", | ||
"engines": { | ||
"node": "20.17.0", | ||
"pnpm": "9.12.0" | ||
}, | ||
"engineStrict": true, | ||
"packageManager": "pnpm@9.12.0", | ||
"devDependencies": { | ||
"@eslint/js": "^9.11.1", | ||
"@organization/tsconfig": "workspace:*", | ||
"@organization/tsup": "workspace:*", | ||
"@types/eslint-config-prettier": "^6.11.3", | ||
"@types/eslint__js": "^8.42.3", | ||
"eslint": "^9.11.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
"globals": "^15.10.0", | ||
"rimraf": "^6.0.1", | ||
"tsup": "^8.3.0", | ||
"typescript-eslint": "^8.8.0" | ||
}, | ||
"nx": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import eslint from "@eslint/js"; | ||
import tseslint, { Config } from "typescript-eslint"; | ||
import prettier from "eslint-config-prettier"; | ||
|
||
const strictTypeChecked = tseslint.configs.strictTypeChecked; | ||
const stylisticTypeChecked = tseslint.configs.stylisticTypeChecked; | ||
|
||
export const baseConfigs: Awaited<Config> = [ | ||
{ | ||
files: ["**/*.{js,mjs,cjs,ts,tsx,jsx}"], | ||
linterOptions: { | ||
noInlineConfig: true, | ||
}, | ||
languageOptions: { | ||
parserOptions: { | ||
project: ["./tsconfig.json", "./test/tsconfig.json"], | ||
}, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
}, | ||
eslint.configs.recommended, | ||
...strictTypeChecked, | ||
...stylisticTypeChecked, | ||
prettier, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import globals from "globals"; | ||
import type { Config } from "typescript-eslint"; | ||
|
||
export const browserConfigs: Awaited<Config> = [ | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./base"; | ||
export * from "./node"; | ||
export * from "./browser"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import globals from "globals"; | ||
import type { Config } from "typescript-eslint"; | ||
|
||
export const nodeConfigs: Awaited<Config> = [ | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/tsconfig", | ||
"extends": "@organization/tsconfig", | ||
"compilerOptions": { | ||
"baseUrl": "./", | ||
"rootDir": "src", | ||
"outDir": "dist", | ||
"declarationDir": "dist" | ||
}, | ||
"include": [ | ||
"./src/**/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"dist" | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// @ts-check | ||
|
||
import { baseConfigs, nodeConfigs } from "@organization/eslint-config"; | ||
|
||
export default [ | ||
...baseConfigs, | ||
...nodeConfigs, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { tsup } from '@organization/tsup'; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// @ts-check | ||
|
||
import { baseConfigs, browserConfigs, nodeConfigs } from "@organization/eslint-config"; | ||
|
||
export default [ | ||
...baseConfigs, | ||
...nodeConfigs, | ||
...browserConfigs, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.