@layerzerolabs/eslint-config-next
Version:
LayerZero Eslint Config
74 lines (71 loc) • 2.43 kB
JavaScript
// @ts-check
/** @type {import('eslint').ESLint.ConfigData} */
const eslintConfig = {
plugins: ['autofix'],
extends: [
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'./recommended',
],
parserOptions: {
project: true,
},
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'consistent-return': 'off',
'@typescript-eslint/consistent-indexed-object-style': ['error', 'index-signature'],
'@typescript-eslint/consistent-return': 'error',
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'never',
},
],
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/prefer-destructuring': ['error', { object: true, array: false }],
'@typescript-eslint/prefer-find': 'error',
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowNumber: true,
allowBoolean: true,
allowAny: false,
allowNullish: true,
},
],
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/strict-boolean-expressions': [
'error',
{
allowString: false,
allowNumber: true,
allowNullableObject: true,
},
],
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/unified-signatures': [
'error',
{
ignoreDifferentlyNamedParameters: true,
},
],
"autofix/no-unused-vars": [
"off",
{
vars: "local",
args: "all",
argsIgnorePattern: '^_',
ignoreRestSiblings: false,
caughtErrors: "none"
}
],
},
};
module.exports = eslintConfig;