Skip to content

Commit

Permalink
Add first IDE config #135
Browse files Browse the repository at this point in the history
  • Loading branch information
acocheo authored Dec 20, 2022
2 parents 2d943d4 + 8536347 commit fa47a67
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 38 deletions.
17 changes: 17 additions & 0 deletions .github/configurations/node_linters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,20 @@ To run:
```
npm run formatter
```


## 💻 How to configure your IDE
Since linters configurations aren't directly in the project tree, if you use liting plugins in your editor, you have to instruct them about correct path.
Here are some examples:

- ### [VSCode](https://code.visualstudio.com/)
In `.vscode/settings.json`
```json
{
"eslint.options": {
"configFile": ".github/configurations/node_linters/eslint/.eslintrc.json"
},
"stylelint.configFile": ".github/configurations/node_linters/stylelint/.stylelintrc.json",
"prettier.configPath": ".github/configurations/node_linters/prettier/.prettierrc.js",
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-props-no-spreading": "off",
"react/jsx-key": "error",
"react/forbid-prop-types": "off",
"jsx-a11y/control-has-associated-label": "off",
"jsx-a11y/alt-text": "off",
Expand Down
2 changes: 1 addition & 1 deletion .github/configurations/node_linters/stylelint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^5.0.0"
"stylelint-config-standard-scss": "^6.0.1"
}
}
24 changes: 6 additions & 18 deletions .github/configurations/python_linters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,21 @@

# 🐍 Python linters


## 🔧 Dependencies
To use locally, install these dependencies:

- ### [Flake8](https://flake8.readthedocs.io/)
```bash
pip install flake8
pip install -r requirements-linters.txt
```

- ### [Pylint](https://pylint.readthedocs.io/)
```bash
pip install pylint pylint-django
```
To add additional dependecies to CI, insert them in your personal `requirements-linters.txt` file (inside *<requirements_path>* folder).

- ### [isort](https://isort.readthedocs.io/)
```bash
pip install isort
```

- ### [Black](https://black.readthedocs.io/)
```bash
pip install black
```

To add additional dependecies to CI, insert them in `requirements-linters.txt` file (inside *<requirements_path>* folder).

## 📖 How to use
Customize files inside configurations.

**Note:** actually there is no way to extend configurations with other files.


## 💻 How to configure your IDE
W.I.P.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
black==22.3.0
isort==5.10.1
flake8==5.0.4
flake8-django==1.1.5
pylint==2.14.3
pylint-django==2.5.3
bandit==1.7.4
autoflake==1.7.7
17 changes: 17 additions & 0 deletions configurations/node_linters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,20 @@ To run:
```
npm run formatter
```


## 💻 How to configure your IDE
Since linters configurations aren't directly in the project tree, if you use liting plugins in your editor, you have to instruct them about correct path.
Here are some examples:

- ### [VSCode](https://code.visualstudio.com/)
In `.vscode/settings.json`
```json
{
"eslint.options": {
"configFile": ".github/configurations/node_linters/eslint/.eslintrc.json"
},
"stylelint.configFile": ".github/configurations/node_linters/stylelint/.stylelintrc.json",
"prettier.configPath": ".github/configurations/node_linters/prettier/.prettierrc.js",
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-props-no-spreading": "off",
"react/jsx-key": "error",
"react/forbid-prop-types": "off",
"jsx-a11y/control-has-associated-label": "off",
"jsx-a11y/alt-text": "off",
Expand Down
2 changes: 1 addition & 1 deletion configurations/node_linters/stylelint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^5.0.0"
"stylelint-config-standard-scss": "^6.0.1"
}
}
24 changes: 6 additions & 18 deletions configurations/python_linters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,21 @@

# 🐍 Python linters


## 🔧 Dependencies
To use locally, install these dependencies:

- ### [Flake8](https://flake8.readthedocs.io/)
```bash
pip install flake8
pip install -r requirements-linters.txt
```

- ### [Pylint](https://pylint.readthedocs.io/)
```bash
pip install pylint pylint-django
```
To add additional dependecies to CI, insert them in your personal `requirements-linters.txt` file (inside *<requirements_path>* folder).

- ### [isort](https://isort.readthedocs.io/)
```bash
pip install isort
```

- ### [Black](https://black.readthedocs.io/)
```bash
pip install black
```

To add additional dependecies to CI, insert them in `requirements-linters.txt` file (inside *<requirements_path>* folder).

## 📖 How to use
Customize files inside configurations.

**Note:** actually there is no way to extend configurations with other files.


## 💻 How to configure your IDE
W.I.P.
8 changes: 8 additions & 0 deletions configurations/python_linters/requirements-linters.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
black==22.3.0
isort==5.10.1
flake8==5.0.4
flake8-django==1.1.5
pylint==2.14.3
pylint-django==2.5.3
bandit==1.7.4
autoflake==1.7.7

0 comments on commit fa47a67

Please sign in to comment.