5.12.104 • Published 10 months ago

@diotoborg/eveniet-officia v5.12.104

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@diotoborg/eveniet-officia

A plugin for ESLint that allows you to use project-specific rules, similar to the deprecated --rulesdir command line option (more).

Install

npm install @diotoborg/eveniet-officia

./eslint-local-rules.js (or ./eslint-local-rules/index.js)

'use strict';

module.exports = {
  'disallow-identifiers': {
    meta: {
      docs: {
        description: 'disallow identifiers',
        category: 'Possible Errors',
      },
      schema: [],
    },
    create: function (context) {
      return {
        Identifier: function (node) {
          context.report({
            node: node,
            message: 'Identifiers not allowed for Super Important reasons.',
          });
        },
      };
    },
  },
};

./.eslintrc

{
  "plugins": ["@diotoborg/eveniet-officia"],

  "rules": {
    "local-rules/disallow-identifiers": "error"
  }
}

Usage (TypeScript)

npm install ts-node @types/eslint

You'll also need an eslint config like the .eslintrc above (more info).

./eslint-local-rules/index.js

require("ts-node").register({
  transpileOnly: true,
  compilerOptions: {
    module: "commonjs",
  },
});

module.exports = require("./rules").default;

./eslint-local-rules/rules.ts

import type { Rule } from "eslint";

export default {
  "disallow-identifiers": {
    meta: {
      docs: {
        description: 'disallow identifiers',
        category: 'Possible Errors',
      },
      schema: [],
    },
    create: function (context) {
      return {
        Identifier: function (node) {
          context.report({
            node: node,
            message: 'Identifiers not allowed for Super Important reasons.',
          });
        },
      };
    },
  },
} satisfies Record<string, Rule.RuleModule>;

npm/yarn/pnpm workspaces support

This plugin supports npm/yarn/pnpm workspaces, although note that if the eslint-local-rules.js file is in the workspace subdirectory, running from the project root is unsupported.

For example, if there's an eslint-local-rules.js and index.js in ./src/app:

Wrong: npx eslint src/app/index.js

Right: (cd src/app; npx eslint index.js)

Also note that if there is an eslint-local-rules.js file in both the workspace subdirectory and project root, the workspace one takes precedence (assuming you're running eslint from the workspace directory, as above).

Alternatives

Context for this plugin

License

MIT

appprettyrsshttprulessetPrototypeOflanguagebeanstalkcloudwatchclassnamesincludesfastdayjs__proto__@@toStringTagES2017iamwafbundleransifpsource mapRxJSprotoconcatMapregularpathtypeofsharedarraybufferWebSocketsESchildvarsharmony_.extendfigleteslintconfigprogresscheckjQueryinputtddpostcssshebangtypednodejsjavascriptsetImmediatesymbolsentriestoArrayinjson-schema-validatormruvalidatevalidatorconfigcjkes-abstractdataES2019rfc4122Streamsmapreducesnses2018flatMapquerystringschemenamesestreeredux-toolkitsuperagenthasOwnreuseregular-expressionSystem.globalcolumnspackage managertypedarrayequalassertsglobal objectenvironmentsSetECMAScript 2023urlarktypesliceproxystylingECMAScript 6reworknpmenderobjecteventEmitterzxreact-hook-formframeworkInt16ArrayObject.entriesrequirezodcoerciblejsonimmerhooksdescriptionbabel-corees8regular expressionschromepopmotionHyBirdsArray.prototype.filterbrowsermoveclassesdeep-cloneargvtypedarraysformstesterwalkingString.prototype.trimArrayBuffer.prototype.slicegetOwnPropertyDescriptornodematchAllECMAScript 2019fastclonemulti-packagetranspileresjsdiffsymbolrm -fr0internal slotarraysrouteWeakSetasyncminimalECMAScript 2018ES5consolescheme-validationarraybufferhttpsdiffexechardlinkstouchJSONfetchselfutilityformattingmatchesredirectObservablesprotocol-bufferscomputed-typesfastcopyArray.prototype.flattentostringtagtypeconsumeperformanttypessinatraelasticachepolyfilloncevestmobileprivate dataapifind-upUint32ArraynamecircularArrayBuffer#sliceponyfillflattenindicatorecmascriptArray.prototype.containscurl
5.12.104

10 months ago

5.12.103

10 months ago

5.11.103

10 months ago

5.11.102

10 months ago

5.11.101

10 months ago

5.11.100

10 months ago

5.11.99

10 months ago

4.11.99

10 months ago

4.11.98

10 months ago

4.11.97

10 months ago

4.10.97

10 months ago

4.10.96

10 months ago

4.10.95

10 months ago

4.10.94

10 months ago

4.10.93

10 months ago

4.10.92

10 months ago

4.10.91

11 months ago

4.10.90

11 months ago

4.10.89

11 months ago

4.10.88

11 months ago

4.10.87

11 months ago

4.10.86

11 months ago

4.10.85

11 months ago

4.10.84

11 months ago

4.10.83

11 months ago

4.10.82

11 months ago

4.10.81

11 months ago

4.10.80

11 months ago

4.9.80

11 months ago

4.9.79

11 months ago

4.9.78

11 months ago

4.9.77

11 months ago

4.8.77

11 months ago

4.8.76

11 months ago

4.8.75

11 months ago

4.8.74

11 months ago

4.8.73

11 months ago

4.8.72

11 months ago

4.8.71

11 months ago

4.7.71

11 months ago

4.7.70

11 months ago

4.6.70

11 months ago

4.6.69

11 months ago

4.6.68

11 months ago

4.6.67

11 months ago

4.6.66

11 months ago

3.6.66

12 months ago

3.6.65

12 months ago

3.6.64

12 months ago

3.6.63

12 months ago

3.6.62

12 months ago

3.5.62

12 months ago

3.5.61

12 months ago

3.5.60

12 months ago

3.5.59

12 months ago

3.5.58

12 months ago

3.5.57

12 months ago

3.5.56

12 months ago

3.5.55

12 months ago

3.5.54

12 months ago

3.5.53

12 months ago

2.5.53

12 months ago

2.5.52

12 months ago

2.5.51

12 months ago

2.5.50

12 months ago

2.5.49

12 months ago

2.5.48

1 year ago

2.5.47

1 year ago

2.5.46

1 year ago

2.5.45

1 year ago

2.5.44

1 year ago

2.5.43

1 year ago

2.5.42

1 year ago

2.4.42

1 year ago

2.4.41

1 year ago

2.4.40

1 year ago

2.4.39

1 year ago

2.4.38

1 year ago

2.4.37

1 year ago

2.4.36

1 year ago

1.4.36

1 year ago

1.4.35

1 year ago

1.4.34

1 year ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.29

1 year ago

1.4.28

1 year ago

1.4.27

1 year ago

1.4.26

1 year ago

1.4.25

1 year ago

1.4.24

1 year ago

1.4.23

1 year ago

1.3.23

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.3.18

1 year ago

1.3.17

1 year ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.14

1 year ago

1.3.13

1 year ago

1.3.12

1 year ago

1.3.11

1 year ago

1.3.10

1 year ago

1.3.9

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago