Commit Graph

10 Commits

Author SHA1 Message Date
Michaël Zasso 2eff28fb7a
tools: move ESLint to tools/eslint
Greatly simplify how ESLint and its plugins are installed.

PR-URL: https://github.com/nodejs/node/pull/53413
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-19 19:54:08 +00:00
Antoine du Hamel ba73f93f02 tools: enforce use of single quotes in editorconfig
PR-URL: https://github.com/nodejs/node/pull/36020
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-11-12 06:19:49 +00:00
silverwind a173173398
tools: change editorconfig's 'ignore' to 'unset'
According to https://editorconfig.org/#supported-properties the
canonical way to disable a property is to set it to 'unset'. We did use
'ignore' and this generally works because tools ignore unknown values
but some of them like `eclint` are picky on it.

PR-URL: https://github.com/nodejs/node/pull/28440
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-30 16:15:30 +02:00
Roman Reiss 6ea507a8bf
tools: unify .editorconfig rules for 2-space
The `doc` directory had not had any editorconfig rules applied which can
lead to tab indentation in editors. This unifies the rules to use 2-space
as the default. Additionally, all rules are now sorted alphabetically.

PR-URL: https://github.com/nodejs/node/pull/23163
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-01 18:43:55 +02:00
Tobias Nießen 303354b4f7
tools: apply editorconfig rules to tools also
PR-URL: https://github.com/nodejs/node/pull/19521
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-04-01 22:42:27 +02:00
Tobias Nießen 2fc60b286c
tools: remove src dir from JS editorconfig rule
The src directory does not contain any JavaScript files, so there is no
need to match it.

PR-URL: https://github.com/nodejs/node/pull/19521
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-04-01 22:42:22 +02:00
Michaël Zasso 3dc3063275 tools: move eslint from tools to tools/node_modules
This is required because we need to add the babel-eslint dependency
and it has to be able to resolve "eslint".
babel-eslint is required to support future ES features such as async
iterators and import.meta.

Refs: https://github.com/nodejs/node/pull/17755
PR-URL: https://github.com/nodejs/node/pull/17820
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-11 09:48:05 +01:00
Sam Roberts 3cbb553df8 tools: disallow trailing whitespace for markdown
markdown had a dispensation because 2 or more trailing spaces triggers a
new paragraph. There are no examples of that usage in Node, all trailing
whitespace found were mistakes, and the dispensation is now removed.

See: https://github.com/nodejs/node/pull/9620
PR-URL: https://github.com/nodejs/node/pull/9676
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-21 09:04:29 -08:00
Roman Reiss 15b83b967a
tools: enable final newline in .editorconfig
PR-URL: https://github.com/nodejs/node/pull/9410
Fixes: https://github.com/nodejs/node/issues/9402
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-11-04 17:16:31 +01:00
ronkorving d63cceeb10 tools: add .editorconfig
This helps editors (see http://editorconfig.org/#download) to
apply the right indentation and encoding rules to files by
default.

PR-URL: https://github.com/nodejs/node/pull/2993
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-12-16 16:23:32 +01:00