Standard v16.0.0 Release Notes

Release Date: 2020-10-28 // over 3 years ago
  • We're super excited to announce standard 16!

    ๐Ÿš€ As with every new major release, there are lots of new rules in 16.0.0 designed ๐Ÿš€ to help catch bugs and make programmer intent more explicit. This release brings ๐Ÿ‘ better performance, tons of bug fixes, improved JSX, React โš›๏ธ, and Next.js support!

    โฌ†๏ธ When you upgrade, consider running standard --fix to automatically format your code to match the newly added rules.

    ๐Ÿš€ โค๏ธ If you enjoy StandardJS and want to support future releases, please ๐Ÿ‘ support Feross!

    ๐Ÿ†• New features

    • ๐ŸŽ ๐ŸŽ Better performance: the filesystem doesn't need to be traversed multiple times! #1023

      • Massive improvements (on the order of minutes!) for projects with huge folders which are are ignored with .gitignore
    • ๐Ÿ‘ ๐ŸŒŸ Support the .gitignore ignore syntax from the command line #1117

      • In older versions, the command standard src would not lint the src/ folder
      • Instead, a glob pattern like standard src/**/*.js was required
      • This is now fixed! You can run standard src to lint the src/ folder!
    • ๐Ÿ‘ ๐ŸŒŸ Support relative paths from the command line in more situations (e.g. standard ../src/*.js) #1384

    • ๐Ÿ‘• ๐ŸŒŸ New extensions option for linting additional extensions besides .js, .jsx, .mjs, and .cjs

      • Can be configured with the --ext command line flag or in package.json:
      • Example:
      standard --ext .ts
      
      {
        "standard": {
          "extensions": [".ts"]
        }
      }
      
    • ๐ŸŒŸ New cache directory location, respecting XDG_CACHE_HOME preference, with fallback to ~/.cache/standard standard-engine/#214

    ๐Ÿ”„ Changed features

    • โšก๏ธ Update eslint from ~7.11.0 to ~7.12.1

    • โšก๏ธ Update standard-engine from ^12 to ^14

      • Fix inaccurate --help command which indicates that bundle.js is automatically ignored when it is not anymore standard-engine/#224
      • Remove deglob package and use built-in ESLint folder-traversal support
    • Paths with square brackets (e.g. [ and ]) are no longer skipped #1333

      • This pattern is particularly common in Next.js apps, e.g. blog/[slug].js
      • You may notice new errors in these files since they were not being linted before
    • ๐Ÿ‘ Better mono-repo support: Nested node_modules/ folders are ignored by default #1182

    • โœ‚ Remove eslint-plugin-standard #1316

      • We migrated the remaining no-callback-literal rule into eslint-plugin-node

    ๐Ÿ†• New rules

    โœ… (Estimated % of affected standard users, based on test suite in parens)

    ๐Ÿ”„ Changed rules

    • ๐Ÿ˜Œ Relax rule: JSX: Consider the global scope when checking for defined Components #1115
    • ๐Ÿšš Relax rule: JSX: Remove conflicting indentation rule in indent #1499