-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint-config)!: split config packages (#50)
- Loading branch information
Showing
15 changed files
with
179 additions
and
76 deletions.
There are no files selected for viewing
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,2 @@ | ||
tsconfig.json | ||
*.tsbuildinfo |
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,45 @@ | ||
# Viam's ESLint Config for Svelte | ||
|
||
This module contains [Viam][]'s shared [ESLint][] configurations for ESLint v8 in [Svelte][] projects. | ||
|
||
[viam]: https://www.viam.com/ | ||
[eslint]: https://eslint.org/ | ||
[svelte]: https://svelte.dev/ | ||
|
||
## Base config | ||
|
||
Extend the [config](./eslint-config-svelte.js) in `.eslintrc.cjs`. | ||
|
||
```shell | ||
pnpm add --save-dev \ | ||
eslint@^8.56.0 \ | ||
@viamrobotics/eslint-config-svelte \ | ||
@typescript-eslint/parser \ | ||
@typescript-eslint/eslint-plugin \ | ||
eslint-config-prettier \ | ||
eslint-plugin-jest-dom \ | ||
eslint-plugin-simple-import-sort \ | ||
eslint-plugin-svelte \ | ||
eslint-plugin-tailwindcss \ | ||
eslint-plugin-testing-library \ | ||
eslint-plugin-unicorn \ | ||
eslint-plugin-vitest | ||
``` | ||
|
||
```js | ||
// .eslintrc.cjs | ||
'use strict'; | ||
|
||
module.exports = { | ||
root: true, | ||
extends: ['@viamrobotics/eslint-config-svelte'], | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
projectService: true, | ||
}, | ||
}; | ||
``` | ||
|
||
## Non-Svelte projects | ||
|
||
See [@viamrobotics/eslint-config](../eslint-config/) |
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,46 @@ | ||
{ | ||
"name": "@viamrobotics/eslint-config-svelte", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"version": "0.8.0", | ||
"description": "ESLint configuration for Svelte projects at Viam.", | ||
"type": "commonjs", | ||
"main": "./eslint-config-svelte.js", | ||
"types": "./dist/eslint-config-svelte.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/eslint-config-svelte.d.ts", | ||
"default": "./eslint-config-svelte.js" | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/viamrobotics/js-config.git", | ||
"directory": "packages/eslint-config-svelte" | ||
}, | ||
"keywords": [ | ||
"eslint", | ||
"eslintconfig", | ||
"svelte" | ||
], | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@viamrobotics/eslint-config": "workspace:*" | ||
}, | ||
"peerDependencies": { | ||
"@typescript-eslint/eslint-plugin": ">=6 <9", | ||
"@typescript-eslint/parser": ">=6 <9", | ||
"eslint": ">=8 <9", | ||
"eslint-config-prettier": ">=9 <10", | ||
"eslint-plugin-jest-dom": ">=5 <6", | ||
"eslint-plugin-simple-import-sort": ">=12 <13", | ||
"eslint-plugin-svelte": ">=2 <3", | ||
"eslint-plugin-tailwindcss": ">=3 <4", | ||
"eslint-plugin-testing-library": ">=6 <8", | ||
"eslint-plugin-unicorn": ">=47 <57", | ||
"eslint-plugin-vitest": ">=0.5 <0.6", | ||
"typescript": ">=5 <6", | ||
"vitest": "*" | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": "@viamrobotics/typescript-config/base.json", | ||
"compilerOptions": { | ||
"types": ["node"], | ||
"composite": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"outDir": "dist" | ||
}, | ||
"references": [{ "path": "../eslint-config" }], | ||
"include": ["*.js"] | ||
} |
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,2 @@ | ||
tsconfig.json | ||
*.tsbuildinfo |
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
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 |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
"emitDeclarationOnly": true, | ||
"outDir": "dist" | ||
}, | ||
"include": ["**/*.cjs"] | ||
"include": ["*.js"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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