0.1.16 • Published 9 months ago

@acuris/eslint-config v0.1.16

Weekly downloads
505
License
MIT
Repository
github
Last release
9 months ago

@acuris/eslint-config

@acuris/eslint-config

Shared Acuris eslint configuration and code quality tooling.

initialize your project

The simplest and preferred way to initialise your project is to run in your project folder this command:

npx @acuris/eslint-config@latest --init

This will start an interactive initialisation script that will setup everything you need, including packages installation.

if you install new packages after initializing a project (for example, jest or typescript), you may want to run acuris-eslint --init again to add additional dependencies.

update @acuris/eslint-config

Once installed, you can update to the latest version (including dependencies) executing

acuris-eslint --init

lint your entire project

You can lint your entire project running

acuris-eslint

You can fix the formatting for your entire project running

acuris-eslint --fix

You can also pass glob paths, folders or sinngle files to lint.

acuris-eslint hello.js myFolder

For mor help on the list of available options and commands, run

acuris-eslint --help

Note: If PATH does not resolve node binaries in node_modules/.bin, you can prepend all commands with npx.

project configuration

You can add acuris-eslint in package.json root to pass additional options.

{
  name: 'my-package',

  // ...

  "acuris-eslint": {
    /**
     * Override patterns used to apply different eslint rules.
     */
    filePatterns: {
      /** patterns that should be prettified when running --fix, but not validated using eslint parsers */
      prettier: string[] | { [pattern: string]: boolean },

      /** mjs module patterns */
      mjs: string[] | { [pattern: string]: boolean },

      /** .ts, .tsx patterns */
      typescript: string[] | { [pattern: string]: boolean },

      /** .d.ts patterns */
      typescriptDefinition: string[] | { [pattern: string]: boolean },

      /** binary script patterns */
      bin: string[] | { [pattern: string]: boolean },

      /** scripts pattern, similar to bin*/
      scripts: string[] | { [pattern: string]: boolean },

      /** server side code patterns */
      server: string[] | { [pattern: string]: boolean },

      /** dist folder patterns (less stringent rules) */
      dist: string[] | { [pattern: string]: boolean },

      /** test files patterns */
      tests: string[] | { [pattern: string]: boolean }
    },

    /**
     * The path of the eslintrc file to load when running acuris-eslint command
     * Can be overridden by command line option '--config'
     */
    eslintrc: string,
    /**
     * Enables or disable eslint cache when running acuris-eslint command.
     * Can be overridden by command line option '--cache' or '--no-cache'
     */
    eslintCache: boolean,
    /**
     * Changes the path of eslint cache when running acuris-eslint command.
     * By default is `.eslintcache`
     * Can be overridden by command line option '--cache-location'
     */
    eslintCacheLocation: string,
    /**
     * The warnigns and errors output format when running acuris-eslint command.
     * By default is `stylish`.
     * Can be overridden by command line option '--format'
     */
    eslintOutputFormat: string,

    /**
     * The react version to use for react eslint plugin.
     */
    reactVersion: string,

    /**
     * A custom path for the `tsconfig.json` configuration when using typescript.
     * By default, the first tsconfig.json in the current folder or parent folders is used.
     */
    tsConfigPath: string,

    /**
     * The list of packages to disable when initializing a project or running eslint.
     * For example, ['typescript', 'react', 'eslint-plugin-jsx-a11y'] disables typescript, react and jsx-a11y.
     *
     */
    ignoredPackages: string[] | { [packageName: string]: boolean },

    /**
      * Additional node_modules paths to use when resolving eslint plugins or configurations.
      */
    nodeResolvePaths: string[] | { [path: string]: boolean },
  }
}

Changelog

  • v.0.1.1
    • acuris-eslint now supports prettify all supported files, not only JS and TS. Uses thread workers to use free CPUs for prettify.
    • load extensions by overrides
    • add supports for .files, now they get linted
    • options --lint-staged and --ignore-unknown-extensions will skip file with extensions not supported when processing a list of files.
    • eslint 7.0.0, typesript 3.9
    • performance improvements and asynchronous write during fixing
0.1.16

9 months ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.0.66

4 years ago

0.0.65

4 years ago

0.0.64

4 years ago

0.0.63

4 years ago

0.0.62

4 years ago

0.0.61

4 years ago

0.0.60

4 years ago

0.0.59

4 years ago

0.0.56

4 years ago

0.0.57

4 years ago

0.0.58

4 years ago

0.0.54

4 years ago

0.0.53

4 years ago

0.0.52

4 years ago

0.0.51

4 years ago

0.0.50

4 years ago

0.0.49

4 years ago

0.0.48

4 years ago

0.0.47

5 years ago

0.0.46

5 years ago

0.0.45

5 years ago

0.0.44

5 years ago

0.0.43

5 years ago

0.0.42

5 years ago

0.0.41

5 years ago

0.0.40

5 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.35

5 years ago

0.0.34

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.4

5 years ago

0.0.1

5 years ago

0.0.0-dev

5 years ago

0.0.1-alpha1

5 years ago