8.2.4: Use type information for better linting (#328)
๐บ What
Title.
๐ How
Configure ESLint to provide typescript-eslint
with type information. This enables us to adopt better linting rules. For example: switch-exhaustiveness-check
would have blocked the changes to Chronicle that broke the debug view from going out.
It was easiest to adopt the new ESLint "flat config" schema to achieve this. This meant some compatibility code is in place.
More on linting with types: https://typescript-eslint.io/getting-started/typed-linting/
Switch exhaustiveness check: https://typescript-eslint.io/rules/switch-exhaustiveness-check/