patternlab-node icon indicating copy to clipboard operation
patternlab-node copied to clipboard

refactor: updated eslint devDepencencies

Open mfranzke opened this issue 5 years ago • 2 comments

Summary of changes:

It's important that someone else with ESLint, babel and webpack knowledge would have a look at these changes, especially my three code comments and the necessary evaluations.

  • Updated all eslint and related dependencies to newer versions and
  • extracted the eslintconfig within the live-server package to an external config file

added

  • eslint-plugin-node:
    • Two of the previously introduced eslint rules have been moved to this plugin by ESLint v7.0.0:
      • no-mixed-requires -> node/no-mixed-requires
      • no-process-exit -> node/no-process-exit
  • @babel/eslint-plugin

    Companion rules for @babel/eslint-parser. @babel/eslint-parser does a great job at adapting eslint for use with Babel, but it can't change the built-in rules to support experimental features. @babel/eslint-plugin re-implements problematic rules so they do not give false positives or negatives.

updated dependencies

replaced

  • "babel-eslint is now @babel/eslint-parser.", source https://www.npmjs.com/package/babel-eslint and https://babeljs.io/blog/2020/07/13/the-state-of-babel-eslint

Changed

rules
  • Replaced deprecated and removed rules byESLint@7: https://eslint.org/docs/rules/#deprecated (see added section above as well)
extends
  • https://github.com/prettier/eslint-plugin-prettier#recommended-configuration:

    This plugin ships with a plugin:prettier/recommended config that sets up both the plugin and eslint-config-prettier in one go.

    and read further on the section

    Exactly what does plugin:prettier/recommended do? Well, this is what it expands to:

ESLint and babel configs

sub-packages ESLint config file with an extend to root isn't necessary, as ESLint would search for that config anyhow, but we need to reference the root babel.config.js in our monorepo, compare to e.g. https://babeljs.io/docs/en/config-files#root-babelconfigjson-file and https://babeljs.io/docs/en/config-files#file-relative-configuration

pending

  • ~Why do we have both a .eslintrc.js and a .eslintrc.json in the root?~

#updatingdependenciesbitbybitbybitbybitbybitbybitbybitbybit

mfranzke avatar Mar 28 '21 11:03 mfranzke

Somehow this one does not want to deploy to our preview systems 😟

JosefBredereck avatar Apr 17 '21 20:04 JosefBredereck

who has access to the logs and could probably shed some light on what‘s happening there and any error log messages?

I think @sghoweri has access

JosefBredereck avatar May 17 '21 17:05 JosefBredereck