26.0.0 (2020-02-12)
Bug Fixes
- Remove impractical rules (56c62a2)
- base: Disable require-atomic-updates (38cd859)
- base: Improve padding-line-between-statements (4b3c394)
- base: Increase soft limit of complexity rule (a78a702)
- base: Temporarily disable require-unicode-regexp (b248df7)
- typescript: Allow _ parameter names (c0b3779)
- typescript: Only require return await inside try-catch (709751f)
- typescript: Switch to regular camelCase and PascalCase naming convention (182c295)
- Disable no-return-await (14db3eb)
- Fine-tune soft limits of max-lines and max-dependencies (a123f41)
chore
Features
- react: Allow functions created during render (8c80148)
- Lower severity of opinionated rules (c0bea51)
- typescript: Add new TypeScript rules (9e77b24)
- typescript: Disable @typescript-eslint/explicit-module-boundary-types again (a88a683)
- typescript: Enforce naming convention (1fb0844)
- typescript: Improve TypeScript support in base ESLint rules (6763671)
- Add @typescript-eslint/explicit-module-boundary-types (3f106a0)
- Add bunch of JSDoc rules (680550e)
- Add styles/no-default-export (d8b0242)
- Add styles/no-null (a30511b)
- Disable some jsdoc rules when using TypeScript (82220fa)
- Improve jsdoc rules (0a6694d)
- Improve prettier support (1cd6537)
- base: Add no-dupe-else-if (0ee8136)
- base: Add prefer-exponentiation-operator (fd41a01)
- base: Add prefer-regex-literals (01599bd)
- base: Add require-atomic-updates (69f2c36)
- base: Add require-unicode-regexp (0b44ba5)
- base: Disallow assignments of imports (0e6af86)
- base: Disallow return in constructors (f9edbbc)
- base: Disallow return in setters (f3f574c)
- base: Require grouping of setters and getters (94792f2)
BREAKING CHANGES
- react: The default style now is to allow functions created during render. The style peerigon/styles/react-jsx-allow-bind has been removed and replaced by its opposite peerigon/styles/react-jsx-no-bind for applications that use memo a lot.
The motivation behind this is that it's more convenient for a lot of people to create functions during render. The performance downside is usually not an issue and can be mitigated by better usage of useState().
- typescript: There are new rules for TypeScript code:
- typescript: The new rule enforces the consistent use of camelCase, PascalCase and UPPER_CASE for variable, property and member names. Additionally, only PascalCase is allowed for type-like structures.
- Exported functions now need to specify an explicit return type. This enforces everyone to be explicit about the public interface of the module. This is likely to increase the developer experience because type errors will show up closer to the actual error.
- Use param instead of arg and argument.
- The prettier config now uses tabs instead of spaces. This is not actually breaking since Prettier will just format your code in a different way, but it will produce a lot of noise.
- globPatterns.js has been renamed to glob-patterns.js
- base: Require u flag in all regexes. The u flag adds unicode support and reports invalid regex patterns.
- base: ESLint now reports a potential unsafe use of +=,-=,*=,/= in combination with async await
- base: Regex literals are now preferred over new RegExp() if the regex is not dynamic.
- base: The exponentiation operator is now preferred over Math.pow()
- Support for Node versions below 10 has been removed.
- base: Setters can't return values. This is enforced with a linting rule now. See https://eslint.org/docs/rules/no-setter-return
- base: Assignments of imports are now disallowed. They throw a runtime error anyway. See https://eslint.org/docs/rules/no-import-assign
- base: Certain If-else usages that were an error anyway are now a linting error. See ttps://eslint.org/docs/rules/no-dupe-else-if
- base: Returning values from constructors is not allowed anymore. See https://eslint.org/docs/rules/no-constructor-return
- base: Setters and getters now need to be grouped together. See https://eslint.org/docs/rules/grouped-accessor-pairs
- Remove official ESLint 5 support