0.5.0 • Published 1 year ago

@appworks/doctor v0.5.0

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

AppWorks Doctor

Analyse and running codemods over react/rax projects, troubleshooting and automatically fixing errors.

1. Code Scanner

Installation

$ npm i @appworks/doctor --save-dev

or

$ npm install -g @appworks/doctor

Usage

const { Doctor } = require('@appworks/doctor');

const doctor = new Doctor(options);
doctor.scan('/yourProjectPath').then((result) => {
  console.log(result);
});

Usage(CLI)

Use $ appworks-doctor -h for help.

Scan

$ appworks-doctor -s ./

Options

$ appworks-doctor -s ./ --ignore types mock

Options

new Doctor(options?)

  • ignore?: string[], Ignore directories, example 'mock' . .gitignore will work too.

scan('/yourProjectPath', options?)

  • fix?: boolean, whether fix ESLint fixable problems.
  • framework?: string, target project framework, default is react.
  • languageType?: 'js'|'ts', target project languageType, default is js.
  • tempFileDir?: string, set temp reporters file directory, default is node_modules/@appworks/doctor/tmp/.
  • disableESLint?: boolean, whether disable ESLint part reports.
  • disableMaintainability?: boolean, whether disable maintainability part reports.
  • disableRepeatability?: boolean, whether disable repeatability part reports.
  • disableCodemod?: boolean, whether disable codemod part reports.

Result

ESLint

Use @applint/spec check your project.

.eslintrc.js customConfig will merge into ESLint config.

// .eslintrc.js
const { getESLintConfig } = require('@applint/spec');
 
// getESLintConfig(rule: 'rax'|'react', customConfig?);
module.exports = getESLintConfig('react', {
  'no-unused-vars': 'off'
});

.eslintignore ignore config will merge into ESLint ignore.

Maintainability

Use typhonjs-escomplex calculate complexity reports.

Repeatability

Use jscpd calculate repeatability reports.

Codemod

Use @applint/applint check and update Rax and React deprecated usages.

Enjoy!

0.5.0

1 year ago

0.5.0-beta.1

1 year ago

0.5.0-beta.0

1 year ago

0.4.2

2 years ago

0.4.2-beta.0

2 years ago

0.4.1-beta.1

2 years ago

0.4.1

2 years ago

0.3.0-beta.10

2 years ago

0.4.0-beta.0

2 years ago

0.4.0-beta.1

2 years ago

0.4.0-beta.2

2 years ago

0.4.0-beta.3

2 years ago

0.4.0-beta.4

2 years ago

0.4.0-beta.5

2 years ago

0.3.0-beta.9

2 years ago

0.3.1-beta.2

2 years ago

0.3.1-beta.1

2 years ago

0.3.1-beta.4

2 years ago

0.3.0

2 years ago

0.3.1-beta.3

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.1-beta.0

2 years ago

0.3.0-beta.8

2 years ago

0.3.0-beta.6

2 years ago

0.3.0-beta.7

2 years ago

0.3.0-beta.5

2 years ago

0.3.0-beta.2

3 years ago

0.3.0-beta.3

3 years ago

0.3.0-beta.1

3 years ago

0.3.0-beta.4

3 years ago

0.3.0-beta.0

3 years ago

0.2.4-beta.0

3 years ago

0.2.3-beta.1

3 years ago

0.2.3-beta.2

3 years ago

0.2.3

3 years ago

0.2.2-beta.2

3 years ago

0.2.2

3 years ago

0.2.2-beta.1

3 years ago

0.2.1

3 years ago

0.2.1-beta.3

3 years ago

0.2.1-beta.2

3 years ago

0.2.1-beta.1

3 years ago

0.2.0

3 years ago

0.2.0-beta.2

3 years ago

0.2.0-beta.3

3 years ago

0.2.0-beta.1

3 years ago

0.1.0

3 years ago