ianalyzer-test-app

1.0.9 • Public • Published

iAnalyzer

This module is useful for linting your JavaScript, TypeScript, HTML, and CSS code with ESLint/Sonar profile rules and guidelines. User can also include Prettier as well using this module.

Getting Started

Installation

To install iAnalyzer locally in your project, you need to run the below command:

  • Use npm to install the iAnalyzer
npm install ianalyzer

whereas for global installation, the user needs to add '-g' to the above command.

The below script will be added to the package.json of your project.

"ianalyzer-init": "ianalyzer --init"

Initialize iAnalyzer on your project

  • Open your project in a terminal and run a command
npm run ianalyzer-init

Once the above command gets executed, few inputs are required to install it completely.

  • Type of Linting: The user needs to reply to the number provided against each option. (One or multiple options allowed)
  • Path for Linting: The user can add a path of his/her own choice (By default path is ./ which covers the project from the root)
  • Framework being used in the project (Option 1,2 or 3).
  • Language used in the project (If 1,2 or 3 is chosen from the above question).

After answering the above 4 questions the chosen linters from Question 1 will be installed.

Execution

Run iAnalyzer on your project

  • To perform linting on your project execute the above command.
npm run ianalyzer-run

Once the command gets executed, the user can select one or multiple options for linting, as per the installation.

The linting behavior can be modified through the below command, presented in .uxplinterrc file.

"jsLintCommand": "eslint --ext ts,tsx,js,jsx,vue $path"

Auto-fix linting errors

  • To fix linting errors automatically, execute the below command.
npm run ianalyzer-fix

Reports

  • To generate a linting report execute below command.
npm run ianalyzer-report

Once the above command gets executed, Users can opt for a report format. Default selected report format is HTML.

The linting report behavior can be modified through the below command, presented in .uxplinterrc file.

"jsReportCommand": "eslint --quiet --ext js,jsx,snap,md,ts,tsx,vue $path"

Profile

By default, the package provides an 'essential' profile for linting. This profile has a limited set of rules. Users can run ianalyzer-init anytime for updating the profile.

Uninstall iAnalyzer

To remove a partial or complete package, run the ianalyzer-init command and select an appropriate option.

Requirements

Node:

iAnalyzer only supports maintenance and LTS versions of Node.js. Please refer to the Node.js release schedule for more information. NPM versions installed by default with Node.js are supported.

iAnalyzer Version Recommended Minimum
2.0 16.x 14.x

ESLint:

iAnalyzer Version Recommended Minimum
2.0 >=6.x.x 6.x.x

@babel/eslint-parser:

iAnalyzer Version Recommended Minimum
2.0 Latest 7.19.1

babel-eslint:

iAnalyzer Version Recommended Minimum
2.0 10.1.0 10.1.0

Features

  • Zero Configuration

    Just install & it's ready to use!

    No hassle of adding the .eslintrc configuration file or adding the required scripts in package.json to set up the analyzer. Just install the iAnalyzer, and everything is automatically configured with the installation. With the zero config setup, iAnalyzer provides the easiest way to enforce consistent styles in the codebase.

  • Linting Support

    Looking for linting support?

    iAnalyzer provides support for JavaScript, TypeScript,HTML and CSS linting.

    alt text

    Along with provides an option to choose the linter based on the project need. Just need to answer a question before installation and you are good to go.

    alt text

  • Automatic code fixing

    Need to automatically fix the linting errors?

    Just run the command ianalyzer-fix & save your time to fix the liting errors automatically.

    alt text

  • Automatic code formatting

    Need to automatically format the code?

    Just install Prettier and execute ianalyzer-run command to apply code formatting in the code.

    alt text

  • Linting Report

    Want to see linting reports or need to share with the team?

    No worries! iAnalyzer provides the reports in different available formats, just a single update for the format in the scripts, and you get the linting report in the format of your choice.

    alt text

  • Linting Profile

    Afraid of linting, due to thousands of linting errors?

    No worries! iAnalyzer offers the rules that define the best practices into namely 4 categories - Essential, Recommended, Sonar and Custom. It doesn’t enforce hundreds of rules on the codebase all at once, instead it offers us the flexibility to choose from the categories, and scale up as and when one feels comfortable with the existing category.

    alt text

Roadmap

  • SonarQube integration
  • Staged file support for linting
  • Performance testing
  • Security testing
  • Accessibility testing
  • Frontend Dashboard
  • Chrome extension
  • VS code extension

Package Sidebar

Install

npm i ianalyzer-test-app

Weekly Downloads

8

Version

1.0.9

License

MIT

Unpacked Size

367 kB

Total Files

49

Last publish

Collaborators

  • uxp-playarea