From 28a55cbf615face6bf0b9a5bf499cc4bd3750406 Mon Sep 17 00:00:00 2001 From: Robert Rossmann Date: Mon, 25 Jun 2018 12:57:26 +0200 Subject: [PATCH] docs: cosmetic tweaks to tutorials --- tutorial/README.md | 4 ++-- tutorial/nodejs-eslintrc.js | 4 ++-- tutorial/react-eslintrc.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorial/README.md b/tutorial/README.md index 9d60577..323f519 100644 --- a/tutorial/README.md +++ b/tutorial/README.md @@ -20,11 +20,11 @@ When configuring js-coding-standards, please keep the following in mind: > In other words, if you decide to include ie. `@strv/javascript/environments/nodejs/optional`, include it **after** you have included `@strv/javascript/environments/nodejs/v8`. - Some rules are **meant** to be disabled, but only for some folders/files - > For example, the rule `no-process-env` is enabled by default because accessing any any property on `process.env` object causes an expensive C-level function call. However, using `process.env` is the recommended way to manage application configuration. Therefore, some configuration files disable this rule for all files located in a directory named _config_ or _configuration_. Here, you gather all the required configuration options from `process.env` and export them in a module. The rest of your application no longer needs to access `process.env` directly and instead reads the configuration from that module. + > For example, the rule `no-process-env` is enabled by default because accessing any property on `process.env` object causes an expensive C-level function call. However, using `process.env` is the recommended way to manage application configuration. Therefore, some configuration files disable this rule for all files located in a directory named _config_ or _configuration_. Here, you gather all the required configuration options from `process.env` and export them in a module. The rest of your application no longer needs to access `process.env` directly and instead reads the configuration from that module. - Always consider re-configuring a rule rather than disabling it completely > If a rule does not quite fit your exiting codebase and fixing the issues would take considerable amount of time/energy, please consider first if the rule could be re-configured to suit your project's current style, rather than disabling it right away. -# Example configuration files +## Example configuration files Some example configuration files have been prepared for you to look at / add to your project right away. Look for them in this directory! diff --git a/tutorial/nodejs-eslintrc.js b/tutorial/nodejs-eslintrc.js index 24e907c..b96a473 100644 --- a/tutorial/nodejs-eslintrc.js +++ b/tutorial/nodejs-eslintrc.js @@ -4,7 +4,7 @@ // directory, or a subdirectory if your project consists of both node.js and browser code. module.exports = { extends: [ - '@strv/javascript/environments/nodejs/v8', + '@strv/javascript/environments/nodejs/v10', '@strv/javascript/environments/nodejs/optional', '@strv/javascript/coding-styles/recommended', ], @@ -23,7 +23,7 @@ module.exports = { }, rules: { - 'func-names': 0, + 'func-names': 'off', }, }], } diff --git a/tutorial/react-eslintrc.js b/tutorial/react-eslintrc.js index 15d78ff..fb9c8be 100644 --- a/tutorial/react-eslintrc.js +++ b/tutorial/react-eslintrc.js @@ -4,7 +4,7 @@ // directory, or a subdirectory if your project consists of both node.js and browser code. module.exports = { extends: [ - '@strv/javascript/environments/react/v15', + '@strv/javascript/environments/react/v16', '@strv/javascript/environments/react/optional', '@strv/javascript/coding-styles/recommended', ],