1.2.5 • Published 1 year ago

joylint v1.2.5

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

requirements code style

Joylint is the simplest way to enable lint-power for your project. Once installed, this:

  • 👍 Compose ESLint, Prettier, Stylelint, TypeScript => normalized rules
  • Standardized Git process
  • 🥰 Powerful .*rc code snippets

Installation

Prerequisites

If you want to enable ESLint, then Node.js (^12.22.0, ^14.17.0, or >=16.0.0) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.)

Choose your preferred package manager:

# npm
npm i joylint -D

# yarn
yarn add joylint -D

Usage

Then excute yarn joylint to decide which task to do.

  • Install lint tools, will auto install lint-tools and their dependencies, if you have installed, we will skip these packages.
  • Init Husky Task will help you complete husky-realted process and create a rules's script in local.
> joylint
_________________  ___________________   _________
______  /_  __ \ \/ /__  /____  _/__  | / /__  __/
___ _  /_  / / /_  /__  /  __  / __   |/ /__  /
/ /_/ / / /_/ /_  / _  /____/ /  _  /|  / _  /
\____/  \____/ /_/  /_____/___/  /_/ |_/  /_/


? What do you want to do next? (Use arrow keys)
  Install lint tools, includes: Eslint, Prettier, Stylelint
  Init husky and generate githooks scripts, inclued: commit-msg, pre-commit
❯ All Above Task

config *rc.js

Here's a quick demostration:

.prettierrc.js

const joylintPrettier = require('joylint/dist/prettier')

module.exports = {
  ...joylintPrettier,
}

.eslintrc.js

Supported

  • eslint4React
  • eslint4Vue3
  • eslint4Vue2
  • eslint4TS
// customized options
const customizedOptions = {}

module.exports = {
  extends: [require.resolve('joylint/dist/eslint4React')],
  ...customizedOptions,
}

stylelintrc.js

// customized options
const customizedOptions = {
  ignoreFiles: ['index.html'],
}

module.exports = {
  extends: [require.resolve('joylint/dist/stylelint')],
  ...customizedOptions,
}

tsconfig.json

Supported

  • tsconfig4React
  • tsconfig4Vue3

It's highly recommmanded to refer to its content.

{
  "extends": "./node_modules/joylint/dist/reference/tsconfig4React.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["src", "types/**/*", "configs/**/*", "vite.config.ts"]
}

License

Licensed under the MIT License.

1.2.0

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.9

2 years ago

1.1.12

2 years ago

1.1.10

2 years ago

1.1.13

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago