This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
974 additions
and
825 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"Base ESLint configuration": { | ||
"scope": "javascript", | ||
"prefix": "!", | ||
"body": [ | ||
"// @ts-check", | ||
"", | ||
"/** @type {import(\"eslint\").Linter.Config} */", | ||
"const config = {", | ||
" $0", | ||
"};", | ||
"", | ||
"module.exports = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# @strangelovelabs/style-guide-core | ||
|
||
![version](https://badgen.net/npm/v/@strangelovelabs/style-guide-core) | ||
![downloads](https://badgen.net/npm/dt/@strangelovelabs/style-guide-core) | ||
![license](https://badgen.net/npm/license/@strangelovelabs/style-guide-core) | ||
|
||
ESLint and Prettier style guide for various personal projects, which includes configs for popular linting and styling tools. Heavily based on [Vercel's style guide](https://github.com/vercel/style-guide). | ||
|
||
This is a trimmed down version of [@strangelovelabs/style-guide](https://github.com/strangelovelabs/style-guide) which [does not include packages listed here](./scripts/trim-core.js). | ||
|
||
## Installing | ||
|
||
```sh | ||
# using npm | ||
npm install --save-dev @strangelovelabs/style-guide-core | ||
|
||
# using yarn | ||
yarn add --dev @strangelovelabs/style-guide-core | ||
|
||
# using pnpm | ||
pnpm install --save-dev @strangelovelabs/style-guide-core | ||
``` | ||
|
||
## Usage | ||
|
||
Refer to the main readme at https://github.com/strangelovelabs/style-guide. | ||
|
||
## License | ||
|
||
[Mozilla Public License Version 2.0](./LICENSE.txt) |
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,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
for patch in patches/*.patch; do | ||
git apply "$patch" | ||
done |
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 |
---|---|---|
@@ -1,9 +1,20 @@ | ||
// @ts-check | ||
|
||
const { TYPESCRIPT_FILES } = require("./constants"); | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
extends: ["plugin:jest/recommended", "plugin:testing-library/react", require.resolve("./rules/jest")], | ||
plugins: ["testing-library"], | ||
extends: ["plugin:jest/recommended", "plugin:testing-library/react"], | ||
overrides: [ | ||
{ | ||
files: TYPESCRIPT_FILES, | ||
rules: { | ||
"@typescript-eslint/unbound-method": ["off"], | ||
"jest/unbound-method": ["error"], | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = 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
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,12 @@ | ||
// @ts-check | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
rules: { | ||
"jest/no-duplicate-hooks": ["error"], | ||
"jest/prefer-lowercase-title": ["warn"], | ||
"jest/require-top-level-describe": ["error"], | ||
}, | ||
}; | ||
|
||
module.exports = config; |
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
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,12 @@ | ||
// @ts-check | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
rules: { | ||
"@typescript-eslint/explicit-function-return-type": ["off"], | ||
"@typescript-eslint/prefer-nullish-coalescing": ["off"], | ||
"@typescript-eslint/restrict-template-expressions": ["off"], | ||
}, | ||
}; | ||
|
||
module.exports = 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
Oops, something went wrong.