-
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.
Merge pull request #1 from algoan/feat/add-react-eslint-config
feat: define eslint configuration for React TypeScript projects
- Loading branch information
Showing
10 changed files
with
9,311 additions
and
2 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,33 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
# | ||
version: 2 | ||
workflows: | ||
version: 2 | ||
test-publish: | ||
jobs: | ||
- publish: | ||
context: semantic_release | ||
filters: | ||
branches: | ||
only: master | ||
|
||
|
||
|
||
imageA: &defaults | ||
working_directory: ~/tmp | ||
docker: | ||
- image: circleci/node:lts | ||
|
||
jobs: | ||
publish: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install dependencies | ||
command: npm ci | ||
- run: | ||
name: Publish package | ||
command: npm run semantic-release |
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,6 @@ | ||
node_modules | ||
dist | ||
.DS_Store | ||
.nyc_output/ | ||
coverage/ | ||
creds.json |
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 @@ | ||
.circleci/ | ||
.releaserc.json |
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,13 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
["@semantic-release/git", { | ||
"assets": ["package.json", "package-lock.json"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
}] | ||
], | ||
"preset": "angular" | ||
} |
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,2 +1,33 @@ | ||
# react-eslint-config | ||
ESLint configuration file for TypeScript and React projects | ||
<p align="center"> | ||
<a href="http://algoan.com/" target="blank"><img src="https://media.licdn.com/dms/image/C4E0BAQH-hIlc5g9g7w/company-logo_200_200/0?e=2159024400&v=beta&t=j5y9KO1P22GsMx3vBNawrpvyvjD2iyBWGeVPUsRkn5s" width="320" alt="Algoan Logo" /></a> | ||
</p> | ||
|
||
# Algoan React ESLint config | ||
|
||
Algoan [ESLint](https://eslint.org) configuration shared for [React](https://reactjs.org/) projects written in [TypeScript](https://www.typescriptlang.org/) and using [prettier](https://prettier.io/). | ||
|
||
## Installation | ||
|
||
First, install this module running: | ||
|
||
```bash | ||
npm install @algoan/eslint-config-react --save-dev | ||
``` | ||
|
||
Then, create a `.eslintrc.json` file: | ||
|
||
```json | ||
{ | ||
"extends": "@algoan/eslint-config" | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
In your `package.json` file, add a script: | ||
|
||
```json | ||
{ | ||
"lint": "eslint **/*.{js,jsx,ts,tsx}" | ||
} | ||
``` |
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 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'] | ||
} |
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,29 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier/@typescript-eslint", | ||
"plugin:react-hooks/recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": [ | ||
"warn", | ||
{ "allowExpressions": true } | ||
], | ||
"react/prop-types": "off" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
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 @@ | ||
module.exports = require('./eslintrc.json'); |
Oops, something went wrong.