generated from snout-router/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement an ESLint config for React
- Loading branch information
Showing
14 changed files
with
58 additions
and
127 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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
/artifacts/ | ||
/dist/ | ||
/node_modules/ |
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,5 +1,14 @@ | ||
module.exports = { | ||
extends: [ | ||
'@snout', | ||
'standard-jsx', | ||
'standard-react', | ||
], | ||
rules: { | ||
// no requirement for parens around multi-line JSX | ||
'react/jsx-wrap-multilines': 'off', | ||
// broken with react/jsx-wrap-multilines disabled, until https://github.com/yannickcr/eslint-plugin-react/issues/1466 is addressed | ||
'react/jsx-closing-tag-location': 'off', | ||
// no requirement for prop types | ||
'react/prop-types': 'off', | ||
}, | ||
} |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
/.makefiles/ | ||
/artifacts/ | ||
/dist/ | ||
/node_modules/ | ||
/yarn-error.log | ||
/yarn.lock |
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,18 +1,6 @@ | ||
JS_SOURCE_FILES += $(shell find src -type f -iname "*.ts" 2> /dev/null) | ||
_JS_TEST_ASSETS := $(shell find test -type f -not -iname "*.ts" 2> /dev/null) | ||
|
||
################################################################################ | ||
|
||
-include .makefiles/Makefile | ||
-include .makefiles/pkg/js/v1/Makefile | ||
-include .makefiles/pkg/js/v1/with-yarn.mk | ||
|
||
.makefiles/%: | ||
@curl -sfL https://makefiles.dev/v1 | bash /dev/stdin "$@" | ||
|
||
################################################################################ | ||
|
||
dist: rollup.config.js tsconfig.json node_modules $(JS_SOURCE_FILES) | ||
rollup --config rollup.config.js | ||
|
||
@touch "$@" |
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,34 +1,29 @@ | ||
<!-- REPLACE_ME --> | ||
# Snout template repo | ||
|
||
<!-- Uncomment this section | ||
# Snout ESLint configuration for React | ||
|
||
[![Current version][badge-version-image]][badge-version-link] | ||
[![Bundle size][badge-bundle-image]][badge-bundle-link] | ||
[![Build status][badge-build-image]][badge-build-link] | ||
[![Test coverage][badge-coverage-image]][badge-coverage-link] | ||
[badge-build-image]: https://img.shields.io/github/workflow/status/snout-router/GITHUB_REPO_NAME/CI?style=for-the-badge | ||
[badge-build-link]: https://github.com/snout-router/GITHUB_REPO_NAME/actions/workflows/ci.yml | ||
[badge-bundle-image]: https://img.shields.io/bundlephobia/minzip/@snout/GITHUB_REPO_NAME?style=for-the-badge | ||
[badge-bundle-link]: https://bundlephobia.com/result?p=@snout/GITHUB_REPO_NAME | ||
[badge-coverage-image]: https://img.shields.io/codecov/c/gh/snout-router/GITHUB_REPO_NAME?style=for-the-badge | ||
[badge-coverage-link]: https://codecov.io/gh/snout-router/GITHUB_REPO_NAME | ||
[badge-version-image]: https://img.shields.io/npm/v/@snout/GITHUB_REPO_NAME?label=%40snout%2FGITHUB_REPO_NAME&logo=npm&style=for-the-badge | ||
[badge-version-link]: https://npmjs.com/package/@snout/GITHUB_REPO_NAME | ||
--> | ||
|
||
This repository is a template for Snout TypeScript projects. After creating a | ||
repository from this template, follow these steps: | ||
|
||
- Uncomment the badges in this `README.md` file | ||
- Replace the string `GITHUB_REPO_NAME` in all files with the actual repo name. | ||
- Search for `REPLACE_ME` in all files to find areas that need manual input. | ||
- On the settings page (https://github.com/snout-router/GITHUB_REPO_NAME/settings): | ||
- Disable the "Wikis" feature | ||
- Disable the "Projects" feature | ||
- Enable "Automatically delete head branches" under the "Merge button" section | ||
- In the "About" section of the repo: | ||
- Set the repo description and URL | ||
- Disable "Packages" and "Environments" | ||
|
||
[badge-version-image]: https://img.shields.io/npm/v/@snout/eslint-config-react?label=%40snout%2Feslint-config-react&logo=npm&style=for-the-badge | ||
[badge-version-link]: https://npmjs.com/package/@snout/eslint-config-react | ||
|
||
## Installation | ||
|
||
Install as an NPM and then resolve all the peer dependency issues. Peer | ||
dependencies are necessary because of [an ESLint limitation]. | ||
|
||
## Usage | ||
|
||
Designed for use in conjunction with [@snout-router/eslint-config]. | ||
|
||
```js | ||
// .eslintrc.js | ||
module.exports = { | ||
extends: [ | ||
'@snout/react', | ||
], | ||
} | ||
``` | ||
|
||
<!-- References --> | ||
|
||
[@snout-router/eslint-config]: https://github.com/snout-router/eslint-config | ||
[an eslint limitation]: https://github.com/eslint/eslint/issues/3458 |
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 |
---|---|---|
@@ -1,43 +1,38 @@ | ||
{ | ||
"name": "@snout/GITHUB_REPO_NAME", | ||
"name": "@snout/eslint-config-react", | ||
"version": "0.0.0", | ||
"description": "REPLACE_ME", | ||
"repository": "snout-router/GITHUB_REPO_NAME", | ||
"bugs": "https://github.com/snout-router/GITHUB_REPO_NAME/issues", | ||
"description": "The ESLint configuration used by Snout repositories that use React", | ||
"keywords": [ | ||
"eslint", | ||
"eslintconfig" | ||
], | ||
"repository": "snout-router/eslint-config-react", | ||
"bugs": "https://github.com/snout-router/eslint-config-react/issues", | ||
"homepage": "https://snout.dev", | ||
"author": "Erin Millard <[email protected]>", | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"typings": "dist/index.d.ts", | ||
"sideEffects": false, | ||
"main": ".eslintrc.js", | ||
"files": [ | ||
"/dist/" | ||
".eslintrc.js" | ||
], | ||
"engines": { | ||
"node": ">=14" | ||
}, | ||
"scripts": { | ||
"prepare": "rollup --config rollup.config.js" | ||
"dependencies": { | ||
"@snout/eslint-config": "^2.0.0", | ||
"eslint-config-standard-jsx": "^10.0.0", | ||
"eslint-config-standard-react": "^11.0.1" | ||
}, | ||
"devDependencies": { | ||
"@snout/eslint-config": "^1.1.2", | ||
"@snout/jest-config": "^1.0.2", | ||
"@snout/rollup-config": "^1.1.2", | ||
"@snout/tsconfig": "^1.0.3", | ||
"@typescript-eslint/eslint-plugin": "^4.18.0", | ||
"@typescript-eslint/parser": "^4.18.0", | ||
"codecov": "^3.0.2", | ||
"eslint": "^7.21.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jest": "^24.3.2", | ||
"@typescript-eslint/eslint-plugin": "^4.29.2", | ||
"@typescript-eslint/parser": "^4.29.2", | ||
"eslint": ">=7", | ||
"eslint-plugin-import": "^2.24.0", | ||
"eslint-plugin-jest": ">=24", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"eslint-plugin-react": "^7.24.0", | ||
"react": "^17.0.2", | ||
"typescript": "^4.2.3" | ||
"typescript": "^4.3.5" | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.