ente-io/photos-web

ESLint Integration

aakankshabhende opened this issue · 4 comments

ESLint Integration to format code, to fix spacing issues and code styles.

I didn't get what is the issue here as there is an eslint configured already for photos and auth apps.

module.exports = {
// When root is set to true, ESLint will stop looking for configuration files in parent directories.
// This is required here to ensure desktop picks the right eslint config, where this app is
// packaged as a submodule.
root: true,
extends: ['@ente/eslint-config'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
},
ignorePatterns: ['.eslintrc.js'],
};

module.exports = {
// When root is set to true, ESLint will stop looking for configuration files in parent directories.
// This is required here to ensure desktop picks the right eslint config, where this app is
// packaged as a submodule.
root: true,
extends: ['@ente/eslint-config'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
},
ignorePatterns: ['.eslintrc.js'],
};

Both of these extend eslint-config package which has basic eslint rules configured.

extends: [
'next/core-web-vitals',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],

Do you want it to be more restrictive, like by extending airbnb-eslint?
Or do you want a .vscode settings file to auto-format on save?

Yes, I meant a .vscode setting to auto format.

@abhinavkgrd Although #1527 introduces auto-format on save, we should also review the rules. Things like using " or ', and having ; at the end of the line are not enforced.

@pushkar8723 @abhinavkgrd I would like to work on this issue. Could you please assign me this?