Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add a eslint default config #28451

Open
brunojbarros opened this issue Dec 1, 2023 · 0 comments
Open

[Feature] Add a eslint default config #28451

brunojbarros opened this issue Dec 1, 2023 · 0 comments

Comments

@brunojbarros
Copy link
Contributor

Add question "Add a eslint config?" during the installation process:

image

I expect the eslint config file has at least the next config:
'@typescript-eslint/no-floating-promises': 'error'

As it is suggested in this video: https://youtu.be/mn892dV81_8?t=18

Another config could be:

'no-magic-numbers": "off",
'@typescript-eslint/no-magic-numbers': ['error', { 'ignoreArrayIndexes': true }]
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error"

These are all the rules that I am applying to one of the projects:

	rules: {
		'@typescript-eslint/await-thenable': 'error',
		'@typescript-eslint/interface-name-prefix': 'off',
		'@typescript-eslint/explicit-function-return-type': 'error',
		'@typescript-eslint/no-explicit-any': 'warn',
		'@typescript-eslint/no-empty-interface': 'off',
		'@typescript-eslint/no-extra-semi': 'error',
		'@typescript-eslint/no-floating-promises': 'error',
		'@typescript-eslint/no-magic-numbers': ['error', { 'ignoreArrayIndexes': true }],
		'@typescript-eslint/no-namespace': 'off',
		'@typescript-eslint/no-shadow': 'error',
		'@typescript-eslint/no-throw-literal': 'error',
		'@typescript-eslint/no-use-before-define': 'error',
		'comma-dangle': ['warn', 'always-multiline'],
		'no-empty-pattern': ['error', { 'allowObjectPatternsAsParameters': true }],
		'no-extra-semi': 'off',
		'no-magic-numbers': 'off',
		'no-shadow': 'off',
		'no-throw-literal': 'off',
		'no-use-before-define': 'off',
		'quotes': ['warn', 'single', { 'avoidEscape': true }],
		'import-helpers/order-imports': [
			'warn',
			{
				newlinesBetween: 'always',
				groups: [
					'module',
					['parent', 'sibling', 'index'],
				],
				alphabetize: { order: 'asc', ignoreCase: true },
			},
		],
	},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants