1.0.42 • Published 4 years ago

impo-lint-runner v1.0.42

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

ESLINT RUNNER

This project is useful for linting your code with eslint rules and guidelines

To install package

Run npx impo-lint-runner

Further Steps

After basic package installation user will be prompted if s/he is using Typescript For input as y or Y a npm package for Typescript/Angular will be installed. Changes will be done in various files namely: 1) package.json: This package will install dependency related to linting for Typescript. It will also include a script by name eslint-imp in "scripts" object of package.json
2) A file called .eslintrc.js will be generated which will be extending the linting package, also user can write his/er specific rules in this file under rules object. User rules will be given preference over the installed package. 3) A back up file will be generated for package.json and any file including name like .eslintrc so that if user wants to use his/er earlier package s/he can directly use the code from backup file.

For input as n or N a npm package for JavaScript/React will be installed. Changes will be done in various files namely: 1) package.json: This package will install dependency related to linting for JavaScript. It will also include a script by name eslint:react in "scripts" object of package.json
2) A file called .eslintrc will be generated which will be extending the linting package, also user can write his/er specific rules in this file under rules object. User rules will be given preference over the installed package. 3) A back up file will be generated for package.json and any file including name like .eslintrc so that if user wants to use his/er earlier package s/he can directly use the code from backup file.

For linting project or specific files

We have added this script inside scripts tag in package.json eslint-imp": "eslint --ext .js \"src/**/*.{ts,tsx}\" --format html > ./src/linting-output.html, Run npm run eslint-imp 1) For getting the final eslint output one just need to execute npm run eslint-imp after successful installation of the package. 2) The current script added in package.json executes all files with .js,.ts extension. If user wants to execute a particular file replace --ext .js \"src/**/*.{ts,tsx}\" with the file name e.g ./src/app/xyz/xyz.component.ts. For excluding a file: 3) You can tell ESLint to ignore specific files and directories by creating an .eslintignore file in your project's root directory. The .eslintignore file is a plain text file where each line is a glob pattern indicating which paths should be omitted from linting. For example, the following will omit all JavaScript files: **/*.js. 4) After this a file named jsonOutput.json will be generated containing all the errors in html format.
User can change the format by replacing --format html option by below mentioned values in eslint-imp script [checkstyle,codeframe,compact,html,jslint-xml,json-with-metadata,json,junit,stylish,table,tap,unix,visualstudio].

Same steps can be followed for React package, here we need to execute: Run npm run eslint-imp

For fixing linting errors

We have added this script inside scripts tag in package.json eslint-fix": "eslint --ext .js \"src/**/*.{ts,tsx}\" --fix, So one just needs to run above script i.e npm run eslint-fix

Alrtenatively one can also run below mentioned commands to install package

npm i -g impo-lint-runner

impo-lint-runner --init

For removing package

Run npx impo-lint-runner remove

1.0.39

4 years ago

1.0.38

4 years ago

1.0.40

4 years ago

1.0.42

4 years ago

1.0.41

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago