Skip to content

Commit f31e44e

Browse files
Update README.md
Added description
1 parent 331398d commit f31e44e

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

README.md

+44-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
# Python-Script
1+
# Lint your js/ts/rb files using Python script
2+
23
Python script to run your linter for your only changed javascript, typescript and ruby files.
4+
5+
## Problem statement:
6+
##### Traditional way of linting our changed files
7+
We add some script tag in **package.json** like
8+
```sh
9+
"lint:server": "eslint 'app/server/**/*.js' 'app/server/**/*.ts' 'app/server/**/*.tsx'"
10+
```
11+
and we run
12+
```sh
13+
yarn lint:server
14+
```
15+
from root of our project where **package.json** lies.
16+
17+
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**.
18+
we want to run our linter
19+
```sh
20+
(yarn eslint or BE linter command )
21+
```
22+
only for **changed files**, not for **all file**.
23+
It will not be optimised way to use
24+
```sh
25+
yarn lint:server
26+
```
27+
every time though we have only small number of changed files.
28+
29+
30+
31+
### Steps to use
32+
1. Make sure we have python installed.
33+
2. Go to the root of the project.
34+
3. Add all the untracked files into git, which you want to commit.
35+
4. nvm use **<**node version**>** **(if you are using nvm to switch to your node versions for your project or skip this)**
36+
4. python3 BE_FE_Linter.py **or** python BE_FE_Linter.py
37+
38+
39+
License
40+
----
41+
42+
MIT
43+
44+
45+
**Free script, Hell Yeah!**

0 commit comments

Comments
 (0)