https://github.com/akashanand708/python-script
Python script to run your linter for your only changed javascript, typescript and ruby files.
https://github.com/akashanand708/python-script
git-status python python-script python3 ruby-on-rails typescript
Last synced: 11 months ago
JSON representation
Python script to run your linter for your only changed javascript, typescript and ruby files.
- Host: GitHub
- URL: https://github.com/akashanand708/python-script
- Owner: akashanand708
- License: mit
- Created: 2020-07-17T14:10:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T15:08:46.000Z (over 5 years ago)
- Last Synced: 2025-01-04T08:42:06.875Z (about 1 year ago)
- Topics: git-status, python, python-script, python3, ruby-on-rails, typescript
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lint your js/ts/rb files using Python script
Python script to run your linter for your only changed javascript, typescript and ruby files.
## Note: Anyone can modify this file to use it for own purpose.
## Problem statement:
##### Traditional way of linting our changed files
We add some script tag in **package.json** like
```sh
"lint:server": "eslint 'app/server/**/*.js' 'app/server/**/*.ts' 'app/server/**/*.tsx'"
```
and we run
```sh
yarn lint:server
```
from root of our project where **package.json** lies.
Suppose, we are working in a code base connected to **github**, when we **modify** many files and add **new files** to our code base, let's say **10 or 20 files**.
we want to run our linter
```sh
(yarn eslint or BE linter command )
```
only for **changed files**, not for **all file**.
It will not be optimised way to use
```sh
yarn lint:server
```
every time though we have only small number of changed files.
### Steps to use
1. Make sure we have python installed.
2. Go to the root of the project.
3. Add all the untracked files into git, which you want to commit.
4. nvm use **<**node version**>** **(if you are using nvm to switch to your node versions for your project or skip this)**
4. python3 BE_FE_Linter.py **or** python BE_FE_Linter.py
## Gif

License
----
MIT
**Free script, Hell Yeah!**