1.3.8 • Published 1 month ago

@ephemeras/linter v1.3.8

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

English | 简体中文

Introduction

When daily development, we often need to build various projects, open source or enterprise projects. These projects typically require certain quality and standardization requirements. For example, it requires: code formatting, code style, standardized submission information, code submission verification control, etc.

Common solutions are:

  • Use prettier + eslint to format and unify code styles.
  • Use husky + commitlint + lint-staged to control submission information and run verification control on submission.

Code quality and standardized control for these projects are similar. The problem is that configure of them indeed cumbersome, for example you need to installing various dependencies, adding various configuration files, and you even need to ensure the correspondence versions between dependencies you installed.

@ephemeras/linter is a command-line tool used to quickly configure the code quality and standardization of projects. It focuses on the actual specific code quality and standardization requirements in the project through interactive Q&A, while hiding the process of installing various dependencies and creating configuration files. Easily to use and has clearly logic.

@ephemeras/linteris fully functional and easy to use. Supports full and partial addition of functional features, and also provides removal operations for corresponding functional features. Provides the function of preset saving, allowing users to quickly configure projects of the same type. Supports both Chinese and English modes.

For more details, Read online documentation.

Usage

add code linter features into your code manually

init

add target features into your code

available features: format, commit add

remove code linter features from your code manually

clear

remove target features from your code

available features: format, commit remove

presets for code linter

preset

global config for code linter

config

Questions

in Vue project

Q:No Vue file declaration detected

declare

A:add declaration in vite-env.d.ts file

/// <reference types="vite/client" />

declare module '*.vue' {
  import type { DefineComponent } from 'vue'
  const vueComponent: DefineComponent<{}, {}, any>
  export default vueComponent
}

in React project

Q:Unable to resolve path to module '@/*' (.eslintimport/no-unresolved)

alias

A:add settings in .eslintrc file

{
  // ...
  "settings": {
    "typescript": {
      "project": "./tsconfig.json"
    },
    "import/resolver": {
      "alias": {
        "map": [["@", "./src"]],
        "extensions": [".js", ".jsx", ".ts", ".tsx"]
      }
    }
  }
}

create changelog document

$ pnpm install -g conventional-changelog-cli
$ cd my-project
$ conventional-changelog -p angular -i CHANGELOG.md -s

More usage

Relative

  • @ephemeras/linter - Command line tool, quickly configuring and completing project code standardization construction.
  • @ephemeras/utils - Tool collections provide useful features for front-end building, efficient and reliable.
1.3.7

1 month ago

1.3.6

1 month ago

1.3.5

1 month ago

1.3.8

1 month ago

1.3.4

3 months ago

1.3.3

3 months ago

1.3.2

3 months ago

1.3.1

3 months ago

1.3.0

3 months ago

1.2.1

3 months ago

1.2.0

4 months ago

1.1.0

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

0.0.1

7 months ago

0.1.9

1 year ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago