@fc3/eslint-plugin
v0.0.8
Published
A custom ESLint plugin for Saffron projects
Downloads
4
Readme
eslint-plugin
A custom ESLint plugin for Saffron projects. Basically all this plugin does
is ensure that a given file's import
statements are in the expected order:
// Core Node modules go up top:
import FS from 'fs';
import {Readable} from 'streams';
// Then any external libraries (both Saffron and third-party modules):
import Three from 'three';
import HttpServer from '@saffron/http-server';
// Then finally any local dependencies:
import PokemonTrainer from 'trainer/pokemon';
Couple of things to note:
Length of dependencies
Within each dependency group above, dependencies should be ordered from shortest to longest. So this is correct:
import {TimeInterval} from '@saffron/enums';
import {Entity, Solid, State} from '@saffron/game-types';
...but this is not:
import {Entity, Solid, State} from '@saffron/game-types';
import {TimeInterval} from '@saffron/enums';
New line between groups
There's a new line between dependency groups (core Node modules, third-party, and local). 'Nuff said.