Skip to content

Releases: melanieseltzer/toolkit

@mels/[email protected]

19 Sep 18:08
f8c8146
Compare
Choose a tag to compare

Patch Changes

@mels/[email protected]

18 Sep 00:46
c50516b
Compare
Choose a tag to compare

Patch Changes

@mels/[email protected]

13 Sep 17:49
e14c71d
Compare
Choose a tag to compare

Major Changes

  • #27 b995a77 Thanks @melanieseltzer! - First stable release! 🥳

    Features

    • Bump peer dependency to 2.6.0 for singleAttributePerLine support.
    • The config now explicitly declares values for every rule, rather than implicitely relying on the defaults that Prettier sets.
      • Promotes visibility for each rule (see at a glance everything that is set).
      • No longer have to comb through Prettier docs to check what the defaults are for each rule.
      • The rules in our config won't change randomly if the Prettier defaults suddenly change under the hood.

    Rule change(s)

    - trailingComma: 'none'
    + trailingComma: 'es5'

Patch Changes

@mels/[email protected]

13 Sep 17:49
e14c71d
Compare
Choose a tag to compare

Patch Changes

@mels/[email protected]

13 Sep 17:49
e14c71d
Compare
Choose a tag to compare

Major Changes

  • #26 b90a8d3 Thanks @melanieseltzer! - Update package dependencies:

    • Drop support for ESLint v6
    • Add support for ESLint v8
    • Update and unlock dependencies
  • #29 6a749c7 Thanks @melanieseltzer! - Remove project-specific defaults from the config:

    • parserOptions.project
    • parserOptions.tsconfigRootDir
    • settings.'import/resolver'.typescript.project

    The consumer will now need to provide them. parserOptions.project is required, but the other two are optional.

    // .eslintrc.js
    module.exports = {
      extends: ['@mels/base', '@mels/typescript'],
    
      parserOptions: {
        project: '...', // This is now required to consume `@mels/typescript`
        tsconfigRootDir: '...', // Optional
      },
    
      settings: {
        'import/resolver': {
          typescript: {
            project: '...', // Optional
          },
        },
      },
    };
  • #38 08bfefb Thanks @melanieseltzer! - Fix the rule severity so warn and error are used more wisely. In general, try to stick to these principles:

    warn:

    • Anything stylistic or personal preference (ordering, naming, etc)

    error:

    • Anything that would cause a bug
    • Bad coding practices in general
    • Obsolete/deprecated language features, or just straight-up mistakes

Minor Changes

  • #30 7642d43 Thanks @melanieseltzer! - Update the import config:

    • Split import config internally for better organization.
    • Fix bug with import/extensions rule - move it out of the overrides.
    • Enable @typescript-eslint/recommended-requiring-type-checking.

Patch Changes

  • #24 4b1a7fa Thanks @melanieseltzer! - Remove engines.node from package.json

  • #36 ee63bad Thanks @melanieseltzer! - Turn off @typescript-eslint/no-non-null-asserted-optional-chain and @typescript-eslint/no-non-null-assertion.

  • #35 dc458e8 Thanks @melanieseltzer! - Allow TS comments, but only if a justification is provided.

  • #34 d3ea3d4 Thanks @melanieseltzer! - Fix the @typescript-eslint/naming-convention rule to allow for PascalCase in parameters, to support this React desctructuring convention:

    const Component = ({ icon: Icon }) => {
      return <Icon />;
    };

    Also be more specific for variable rules in terms of function variables.

    Previously, PascalCase was allowed for all variables. But in reality, we only want to allow PascalCase for function variables (to allow for React uppercase component convention):

    // valid
    const SomeComponent = () => ...
    
    // not valid
    const HiHello = 'hello';

@mels/[email protected]

13 Sep 17:49
e14c71d
Compare
Choose a tag to compare

Major Changes

  • #26 b90a8d3 Thanks @melanieseltzer! - Update package dependencies:

    • Drop support for ESLint v6
    • Add support for ESLint v8
    • Update and unlock dependencies
  • #38 08bfefb Thanks @melanieseltzer! - Fix the rule severity so warn and error are used more wisely. In general, try to stick to these principles:

    warn:

    • Anything stylistic or personal preference (ordering, naming, etc)

    error:

    • Anything that would cause a bug
    • Bad coding practices in general
    • Obsolete/deprecated language features, or just straight-up mistakes
  • #38 08bfefb Thanks @melanieseltzer! - Turned on rules that were previously set to off:

    • testing-library/no-render-in-setup
    • react/no-array-index-key
  • #39 02506cf Thanks @melanieseltzer! - Remove all Testing Library rules from this config. It now lives in eslint-plugin-jest.

Patch Changes

@mels/[email protected]

13 Sep 17:49
e14c71d
Compare
Choose a tag to compare

Major Changes

  • #26 b90a8d3 Thanks @melanieseltzer! - Update package dependencies:

    • Drop support for ESLint v6
    • Add support for ESLint v8
    • Update and unlock dependencies
    • Add Prettier v2 peer dependency

Patch Changes

@mels/[email protected]

13 Sep 17:49
e14c71d
Compare
Choose a tag to compare

Major Changes

  • #26 b90a8d3 Thanks @melanieseltzer! - Update package dependencies:

    • Drop support for ESLint v6
    • Add support for ESLint v8
    • Update and unlock dependencies
  • #33 e08d4b5 Thanks @melanieseltzer! - Improve and fix jest config

    • Add the jest env to the config
    • Extend from plugin:jest/style
    • Flip all severity from warn to error to be stricter
    • Add additional **/tests/**/*.[jt]s?(x) file matcher

    Also turned on the following rules:

    • jest/expect-expect
    • jest/no-conditional-in-test
    • jest/consistent-test-it
    • jest/prefer-each
    • jest/prefer-hooks-in-order
    • jest/prefer-mock-promise-shorthand
    • jest/prefer-spy-on
    • jest/unbound-method
  • #39 02506cf Thanks @melanieseltzer! - Move all Testing Library rules into this config.

    eslint-config-jest will check under the hood if @testing-library/react is installed by the consumer, and if so, then it will automatically enable the Testing Library rules.

  • #38 08bfefb Thanks @melanieseltzer! - Fix the rule severity so warn and error are used more wisely. In general, try to stick to these principles:

    warn:

    • Anything stylistic or personal preference (ordering, naming, etc)

    error:

    • Anything that would cause a bug
    • Bad coding practices in general
    • Obsolete/deprecated language features, or just straight-up mistakes

Patch Changes

@mels/[email protected]

13 Sep 17:49
e14c71d
Compare
Choose a tag to compare

Major Changes

  • #26 b90a8d3 Thanks @melanieseltzer! - Update package dependencies:

    • Drop support for ESLint v6
    • Add support for ESLint v8
    • Update and unlock dependencies
  • #38 08bfefb Thanks @melanieseltzer! - Changed these rules:

    • no-use-before-define: cannot use classes before defined

    Removed these rules:

    • no-restricted-syntax
    • no-script-url
    • no-labels
  • #38 08bfefb Thanks @melanieseltzer! - Fix the rule severity so warn and error are used more wisely. In general, try to stick to these principles:

    warn:

    • Anything stylistic or personal preference (ordering, naming, etc)

    error:

    • Anything that would cause a bug
    • Bad coding practices in general
    • Obsolete/deprecated language features, or just straight-up mistakes

Minor Changes

  • #30 7642d43 Thanks @melanieseltzer! - Update the import config:

    • Use eslint-plugin-simple-import-sort for autofixable sorting.
    • Remove import/no-extraneous-dependencies rule because it's not working quite right with glob patterns.
  • #28 9f3ceb6 Thanks @melanieseltzer! - Added the ESLint patch into the base config, so the consumer doesn't have to worry about it.

Patch Changes

@mels/[email protected]

19 Mar 18:15
31695fa
Compare
Choose a tag to compare

Minor Changes