1.1.0 • Published 1 year ago

@eternagame/eslint-plugin v1.1.0

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
1 year ago

@eternagame/eslint-plugin

Eterna standard ESLint setup and utilities

Installation

Note that the following are marked as optional peer dependencies, so you need to explicitly install them if using the relevant configs (in order to avoid downloading them when you aren't):

  • eslint-config-airbnb-typescript (for the typescript configurations)
  • eslint-config-airbnb-vue (for the vue configurations)
  • @nrwl/eslint-plugin-nx (for the Nx configs)

Configuration

There are six sets of configurations available:

  • plugin:@eternagame/javascript (core)
  • plugin:@eternagame/typescript (core)
  • plugin:@eternagame/vue3-javascript (core)
  • plugin:@eternagame/vue3-typescript (core)
  • plugin:@eternagame/nx-javascript
  • plugin:@eternagame/nx-typescript

Note that @eternagame/typescript extends @eternagame/javascript, @eternagame/vue3-javascript extends @eternagame/javascript, and @eternagame/vue3-typescript extends @eternagame/typescript, so you should pick whichever of the core configs has the greatest superset of features you want to work with.

The Nx configurations must be added separately, but if you use @eternagame/nx-javascript you must use any of the core configs and if you use @eternagame/nx-typescript you must use one of the typescript core configs (as they override rules in the relevant js/ts airbnb config).

Background/Rationale/Design

Core configurations are based on airbnb, a relatively popular style guide. Typescript core configurations also take advantage of typescript-eslint (with all recommended rules, including those requiring type checking) and airbnb-typescript to handle conflicting definitions. The vue3 configs add on the vue3 recommended rules. All and all, we feel these are overall sensible defaults to go with, using relatively standard configurations for each technology.

As we use Nx monorepos, we've also included the additional configuration for that setting.

Under src/configs/base-rules, you will find additional rule customizations we have opted for. Each change is documented with specific rationale, but in general reflects our personal experience with what we find useful for our workflow and stylistic preferences.

Also note that the various configs are tied to their relevant extension. IE, the javascript config only applies to js/jsx files, and the typescript config uses that plus a separate configuration for ts/tsx files, rather than the js configuration applying for js and ts then overriding specific parts of the config for ts files. This is to cleanly handle issues with mixed codebases in addition to the specific ordering requirements of the various base configurations used in the core configurations. Shared configuration is still made available in src/configs/base-rules (and in the case of parserOptions, the javascript config which is included in all other core configs).

2.0.0-dev.196

1 year ago

2.0.0-dev.195

1 year ago

2.0.0-dev.185

1 year ago

2.0.0-dev.186

1 year ago

2.0.0-dev.184

1 year ago

2.0.0-dev.189

1 year ago

2.0.0-dev.187

1 year ago

2.0.0-dev.188

1 year ago

2.0.0-dev.192

1 year ago

2.0.0-dev.193

1 year ago

2.0.0-dev.190

1 year ago

2.0.0-dev.191

1 year ago

2.0.0-dev.194

1 year ago

2.0.0-dev.178

2 years ago

2.0.0-dev.179

2 years ago

2.0.0-dev.176

2 years ago

2.0.0-dev.177

2 years ago

2.0.0-dev.181

2 years ago

2.0.0-dev.182

2 years ago

2.0.0-dev.180

2 years ago

2.0.0-dev.164

2 years ago

2.0.0-dev.183

2 years ago

2.0.0-dev.167

2 years ago

2.0.0-dev.168

2 years ago

2.0.0-dev.165

2 years ago

2.0.0-dev.166

2 years ago

2.0.0-dev.174

2 years ago

2.0.0-dev.175

2 years ago

2.0.0-dev.156

2 years ago

2.0.0-dev.157

2 years ago

2.0.0-dev.154

2 years ago

2.0.0-dev.155

2 years ago

2.0.0-dev.149

2 years ago

2.0.0-dev.158

2 years ago

2.0.0-dev.159

2 years ago

2.0.0-dev.160

2 years ago

2.0.0-dev.163

2 years ago

2.0.0-dev.152

2 years ago

2.0.0-dev.153

2 years ago

2.0.0-dev.161

2 years ago

2.0.0-dev.150

2 years ago

2.0.0-dev.162

2 years ago

2.0.0-dev.151

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago