https://blueprints.launchpad.net/fuel/+spec/converge-to-eslint-config-openstack
Fuel UI is using independent ESLint config to lint JavaScript code. Since Fuel in a part of OpenStack, we must use OpenStack coding style.
There is eslint-config-openstack project which contains .eslintrc with rules for all OpenStack projects. Fuel’s .eslintrc is significantly different - it contains extra rules and different values. Switching to OpenStack style will make it easier for external contributors to contribute.
Fuel’s .eslintrc needs to be rewritten to extend eslint-config-openstack. It’s possible to disable some rules from eslint-config-openstack if there is a valid reason, but the number of such rules should be minimal. It’s ok for extra rules (which are not present in eslint-config-openstack) to stay. React and ES6 rules should also stay in .eslintrc.
Fuel UI code should be updated accordingly.
Fuel UI code needs to be fixed according to the new rules to pass CI.
None
None
None
None
None
None
None
None
None
It will take some time for active contributors to adapt to the new coding style.
For new contributors which are familiar with other OpenStack projects it will be easier to start contributing.
None
None
The rules should be enabled one-by-one. The diffs can be very large, so it’s preferred to finish transition at the beginning of the development cycle to avoid conflicts.
Fuel CI runs ESLint as a part of verify-fuel-web-ui job, so all the changes are tested automatically.
The following rules need to be used from eslint-config-openstack (i.e. they shouldn’t be overriden in Fuel’s .eslintrc):