1 | # Changelog
|
2 |
|
3 | Here is list of rules modifications. (starting from v9)
|
4 |
|
5 | ## 10
|
6 |
|
7 | ### Changes
|
8 | - Drop node v8 support, 10.20.0 being the minimal node version required.
|
9 | - Eslint v7 minimum.
|
10 | - Adopt prettier major
|
11 | - Upgrade all plugins
|
12 |
|
13 | ### Details
|
14 | #### Eslint v7
|
15 | Main enhancements of the new major:
|
16 | - comment ('description') in directive introduced
|
17 | - no need to specify extension for files specified in overrides pattern
|
18 | - better plugin discovery (now detect one relatives to config files)
|
19 |
|
20 | More details [in blog post announcing the release, here](https://eslint.org/blog/2020/05/eslint-v7.0.0-released)
|
21 |
|
22 | New core eslint rules:
|
23 | - default-case-last
|
24 | - no-useless-backreference'
|
25 |
|
26 | #### Prettier v2
|
27 | Some fundamental changed were introduced is was not possible for all of them to be opted out when we wanted.
|
28 | - Mandatory parenthesis for arrow functions, and trailing commas were disabled
|
29 | - Space between function name and parenthesis is now forced. (unfortunately non configurable)
|
30 |
|
31 | More details for prettier v2 breaking changes [here](https://prettier.io/blog/2020/03/21/2.0.0.html)
|
32 |
|
33 | #### Node
|
34 | ##### Migrated rules (most were not activated):
|
35 | - no-buffer-constructor -> no-deprecated-api
|
36 | - no-process-env
|
37 | - no-new-require
|
38 | - no-path-concat
|
39 | - no-sync
|
40 | - global-require
|
41 | - no-process-exit
|
42 | - handle-callback-err
|
43 | - no-restricted-modules
|
44 | - callback-return
|
45 |
|
46 | Deprecated eslint core rules have been turned of and flagged to be removed when dropped.
|
47 | Their current config was port to the node plugin counterpart.
|
48 |
|
49 | ##### New rules
|
50 | - node/exports-style (`module.exports`)
|
51 | - node/file-extension-in-import: (`"always", {".js": "never", ".ts": "never"}]`)
|
52 | - node/no-callback-literal
|
53 | - node/no-exports-assign
|
54 | - node/no-extraneous-import
|
55 | - node/no-extraneous-require
|
56 | - node/no-missing-import (_migth be redundant with the import plugin)
|
57 | - node/no-missing-require
|
58 | - node/no-unsupported-features/es-builtins (relies in node range specified in `package.json#engines`)
|
59 | - node/no-unsupported-features/es-syntax
|
60 | - node/no-unsupported-features/node-builtins
|
61 | - node/process-exit-as-throw (better code path analysis)
|
62 | - node/prefer-global/buffer
|
63 | - node/prefer-global/console
|
64 | - node/prefer-global/process
|
65 | - node/prefer-global/text-decoder
|
66 | - node/prefer-global/text-encoder
|
67 | - node/prefer-global/url
|
68 | - node/prefer-global/url-search-arams
|
69 |
|
70 | #### ava
|
71 | Introduced:
|
72 | - ava/use-t-throws-async-well
|
73 | #### core
|
74 | Introduced
|
75 | - unicorn/prefer-number-properties, should be opt out when es5 still used.
|
76 |
|
77 | unicorn had introduced many new rules in latest majors, but they are neither not interesting, not desired or too dangerous due to autofix.
|
78 |
|
79 | ## 9.3
|
80 | ### React
|
81 | Introduced:
|
82 | - react/jsx-no-script-url
|
83 | ### Mocha
|
84 | Introduced
|
85 | - chai-expect/no-inner-literal
|
86 |
|
87 | ## 9.2
|
88 |
|
89 | Introduced custom coorpacademy/jsx-no-logical-expression in the react scope
|
90 |
|
91 | ## 9.1
|
92 | ### core
|
93 | Introduced:
|
94 | - prefer-regex-literals
|
95 | - grouped-accessor-pairs
|
96 | - no-constructor-return
|
97 | - no-dupe-else-if
|
98 | - no-setter-return
|
99 |
|
100 |
|
101 | - unicorn/consistent-function-scoping (could be painful in test where it's acceptable to disable it)
|
102 | - unicorn/prefer-reflect-apply (to disable in front)
|
103 | - unicorn/no-console-spaces
|
104 | - unicorn/no-for-loop
|
105 | - unicorn/no-unreadable-array-destructuring
|
106 | - unicorn/no-unused-properties
|
107 | - unicorn/no-zero-fractions
|
108 | - unicorn/prefer-includes
|
109 | - unicorn/prefer-node-append
|
110 | - unicorn/prefer-node-remove
|
111 | - unicorn/prefer-text-content
|
112 |
|
113 | unicorn/prevent-abbreviations was tried but considered too painful
|
114 |
|
115 | ### Ava
|
116 | - ava/no-incorrect-deep-equal
|
117 | - ava/no-inline-assertions
|
118 | - ava/prefer-t-regex
|
119 |
|
120 | ava/test-title-format was not activated, as ava/hooks-order
|
121 |
|
122 | ### Mocha
|
123 | - mocha/no-async-describe
|
124 |
|
125 | ### react
|
126 | - react/destructuring-assignment
|
127 | - react/jsx-max-depth
|
128 | - react/jsx-child-element-spacing
|
129 | - react/jsx-one-expression-per-line
|
130 | - react/jsx-props-no-multi-spaces
|
131 | - react/button-has-type
|
132 | - react/jsx-sort-default-props
|
133 | - react/no-this-in-sfc
|
134 | - react/no-unsafe
|
135 | - react/jsx-curly-newline (with following config: `{multiline: 'require', singleline: 'forbid'}`)
|
136 |
|
137 | ### flow
|
138 | Mis en warning le temps de statuer
|
139 | - flowtype/array-style-complex-type
|
140 | - flowtype/array-style-simple-type
|
141 | - flowtype/require-compound-type-alias
|
142 | - flowtype/no-mixed
|
143 |
|
144 | ## No documentation so far before 9.1
|