Opinionated JavaScript linter

Usage no npm install needed!

<script type="module">
  import norme from '';



Opinionated JavaScript linter

NPM version Linux and OS X build status Windows build status Code coverage Code style

Norme is an ESLint based JavaScript linter with lowly-configurable opinionated rules. It does not pretend to be the one style to rule them all. We all have different ideals when it comes to writing code, that linter enforces one of them:

  • 2 spaces indentations
  • no semicolon
  • dangling comma
  • support for, Node.js, React, Electron
  • ensure the requires and imports can be resolved
  • and more...


$ npm install --save-dev norme



Using the above command will install Norme locally to your project, this is the recommended way to use it. The version should be fixed in the devDependencies so that your build don't break if the rules evolve. It can be accessed from the scripts in package.json.

  "scripts": {
    "test": "norme"
  "devDependencies": {
    "norme": "1.0.0"


Installing this package with npm install --global norme will expose a binary allowing you to lint code from the command line. See the CLI documentation for more information.

It exits with code 0 when there are no errors:

$ norme lib

$ echo $?

It exits with the number of errors (warnings are not counted) otherwise:

$ norme test/fixtures/ko_parsingerror

  1:12  error  Parsing error: Unexpected token }

✖ 1 problem (1 error, 0 warnings)

$ echo $?



Usage: norme [options] [file ...]

  --eslintrc     Whether the ESLint configuration files should be read
                                                      [boolean] [default: false]
  --ext          A comma separated list of extension to search for in folders
                                                  [string] [default: ".js,.jsx"]
  -f, --format   The ESLint formatter to use
       [string] [choices: "checkstyle", "compact", "html", "jslint-xml", "json",
           "junit", "stylish", "table", "tap", "unix", "visualstudio"] [default:
  -h, --help     Print this help message and exit                      [boolean]
  -v, --version  Print version information and exit                    [boolean]

  norme --ext=.js,.jsx,.es6 src    Support custom file extensions while linting
                                   the src folder
  norme --formatter=json src test  Specify the ESLint formatter while linting
                                   the src and test folders
  norme && ava                     Leverage the exit code to only launch ava if
                                   there are no lint errors
  norme --eslintrc                 Load the ESLint configuration files (if any)
                                   to overload the Norme rules

  - by default, the following files will be linted: bin, lib, src, test
  - if a directory is passed, it will be recursively crawled
  - the exit code represents the number of linting errors

For more information: see


Norme(files[, options])


Type: String[]

The files or directories to lint. If a directory is passed, it will be crawled and all the files matching the options.extensions will be linted.


Type: Object
Default: {}


Type: String
Default: process.cwd()

The root directory from which the files should be resolved from.


Type: String[]
Default: [ '.js', 'jsx' ]

The extensions to search for when directories are provided.


Type: Boolean
Default: false

Whether the ESLint configuration files can override the Norme rules.


It is possible to define a configuration in the norme key of package.json. All the options you could pass to the Norme constructor (see API documentation) can be placed here. Note that it has a lower precedence than the CLI, allowing to override options via the command line.

  "norme": {
    "extensions": [ ".js", ".jsx", ".es6" ]


Can I integrate Norme with my IDE?

Sure, just grab an ESLint plugin for your IDE and create the following .eslintrc.js in your project root:

module.exports = require('norme').rc()

How can I show my support?

Add the following badge to your project:

Code style

[![Code style](](

Where does that name come from?

Norme is the french word for norm. It has the same pronunciation.