Skip to content

Commit

Permalink
Develop (#39)
Browse files Browse the repository at this point in the history
* fix: fix react version

* feat: add object and array newline rules (#29)

Co-authored-by: Tim Streicher <[email protected]>

* fix(ci): release stuck (#32)

* Update README.md

* add images

* fix(all): add keyword react

* fix(react): set react version setting to "detect" (#30)

* feat: provide initial react eslint config

* docs: add README for react config

* fix: update package.json

* fix(#27): set react version setting to "detect"

Co-authored-by: Ulf Gerking <[email protected]>
Co-authored-by: Intervention128 <[email protected]>

* fix: fixes issue #35 (#36)

Co-authored-by: Ulf Gerking <[email protected]>
Co-authored-by: Tim Streicher <[email protected]>

* fix: fixes issue #37

* docs: add CONTRIBUTING.md (#34)

Co-authored-by: Merlin Flach <[email protected]>

Co-authored-by: Robin Kehl <[email protected]>
Co-authored-by: Tim Streicher <[email protected]>
Co-authored-by: OrbisK <[email protected]>
Co-authored-by: Ulf Gerking <[email protected]>
Co-authored-by: Intervention128 <[email protected]>
Co-authored-by: Moerlin1337 <[email protected]>
Co-authored-by: Merlin Flach <[email protected]>
  • Loading branch information
8 people authored Dec 12, 2022
1 parent 75ec756 commit 24c0d2b
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing

- [Development Setup](#development-setup)
- [Commits](#commits)
- [Pull Requests](#pull-requests)

[//]: # (- [Tests]&#40;#tests&#41;)
[//]: # (- [Storybook]&#40;#storybook&#41;)

## Development Setup
You will need [Node.js](https://nodejs.org/en/) version 12+

1. Fork from GitHub
2. Clone the forked project
3. checkout develop branch
4. Run `npm install` to install dependencies.

[//]: # (This is where you can add testing instructions)

[//]: # (## Tests)
[//]: # (To test the component, we are using [Cypress]&#40;https://www.cypress.io&#41;. If you add a new feature make sure to write additional tests for it.)
[//]: # ()
[//]: # ()
[//]: # (Run `npm run cypress:open` to start the cypress testing server. )
[//]: # (The cypress test environment will open itself automatically.)


[//]: # (This is where you can add storybook instructions)

[//]: # (## Storybook)
[//]: # (We also set up [Storybook]&#40;https://storybook.js.org&#41; for our component.)
[//]: # ()
[//]: # (Run `npm run storybook` to start the storybook server.)

## Commits
Commit messages should follow [Vue's commit message convention](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md).

## Pull Requests

- Do not submit PRs against the `main` branch. Checkout a topic branch from the relevant branch (e.g. develop) and merge back against that branch
- Work in the `src` folder and DO NOT check in `dist` in the commits
- It's okay to have multiple small commits - GitHub will automatically squash it before merging
- Make sure the project can be built using `npm run build`
- If you are fixing a bug:
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your Pull Request title.
- Add appropriate test coverage if applicable
2 changes: 1 addition & 1 deletion configs/all/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint": ">=7.4.0"
},
"dependencies": {
"@singularit/eslint-config-react": "^0.0.1",
"@singularit/eslint-config-react": "*",
"@singularit/eslint-config-vue": "^1.1.3",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
Expand Down
11 changes: 10 additions & 1 deletion configs/react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@ module.exports = {
],
settings: {
react: {
version: 'latest',
version: 'detect',
},
},
overrides: [
{
files: ['**/*.tsx'],
rules: {
'react/prop-types': 'off', // Turn off propTypes validation in TSX files
'@typescript-eslint/comma-dangle': ['error', {
generics: 'always', // prevent confusing generic syntax as tsx
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
},
},
],
Expand Down Expand Up @@ -60,6 +68,7 @@ module.exports = {
'react/prefer-es6-class': ['error', 'always'], // Prefer ES6 class over React.createClass
'react/sort-comp': 'error', // Enforce sorted methods in class components
// JSX specific rules
'jsx-quotes': ['error', 'prefer-double'],
'react/jsx-boolean-value': 'error', // Enforce boolean attributes notation in JSX
'react/jsx-closing-bracket-location': 'error', // Validate closing bracket location in JSX
'react/jsx-closing-tag-location': 'error', // Validate closing tag location for multiline JSX
Expand Down

0 comments on commit 24c0d2b

Please sign in to comment.