forked from visoftsolutions/noir_rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Remove mandatory jsdoc (AztecProtocol#4180)
Fixes AztecProtocol#3860
- Loading branch information
1 parent
4cf818f
commit 844da1f
Showing
5 changed files
with
73 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('@aztec/foundation/eslint'); | ||
module.exports = require('@aztec/foundation/eslint.docs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('@aztec/foundation/eslint'); | ||
module.exports = require('@aztec/foundation/eslint.docs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// See https://typescript-eslint.io/play/#ts=5.1.6&showAST=es&fileType=.ts | ||
const contexts = [ | ||
// All methods in an interface | ||
'TSInterfaceDeclaration TSMethodSignature', | ||
// All public methods in a class that does not implement an interface | ||
'ClassDeclaration[implements.length=0] MethodDefinition[accessibility=public]', | ||
// TODO: All methods public by default in a class that does not implement an interface | ||
// 'ClassDeclaration[implements.length=0] MethodDefinition[accessibility=undefined][key.type=Identifier]', | ||
// TODO: All export const from the top level of a file | ||
// 'ExportNamedDeclaration[declaration.type=VariableDeclaration]', | ||
// Legacy contexts below (needs review) | ||
'TSParameterProperty[accessibility=public]', | ||
'TSPropertySignature', | ||
'PropertySignature', | ||
'TSInterfaceDeclaration', | ||
'InterfaceDeclaration', | ||
'TSPropertyDefinition[accessibility=public]', | ||
'PropertyDefinition[accessibility=public]', | ||
'TSTypeAliasDeclaration', | ||
'TypeAliasDeclaration', | ||
'TSTypeDeclaration', | ||
'TypeDeclaration', | ||
'TSEnumDeclaration', | ||
'EnumDeclaration', | ||
'TSClassDeclaration', | ||
'ClassDeclaration', | ||
'TSClassExpression', | ||
'ClassExpression', | ||
'TSFunctionExpression', | ||
'FunctionExpression', | ||
'TSInterfaceExpression', | ||
'InterfaceExpression', | ||
'TSEnumExpression', | ||
'EnumExpression', | ||
]; | ||
|
||
const base = require('./.eslintrc.cjs'); | ||
const JSDOC_RULES_LEVEL = 'error'; | ||
|
||
module.exports = { | ||
...base, | ||
plugins: [...base.plugins, 'jsdoc'], | ||
overrides: [ | ||
...base.overrides, | ||
{ files: '*.test.ts', rules: { 'jsdoc/require-jsdoc': 'off' } }, | ||
], | ||
rules: { | ||
...base.rules, | ||
'tsdoc/syntax': JSDOC_RULES_LEVEL, | ||
'jsdoc/require-jsdoc': [ | ||
JSDOC_RULES_LEVEL, | ||
{ | ||
contexts, | ||
checkConstructors: false, | ||
checkGetters: true, | ||
checkSetters: true, | ||
}, | ||
], | ||
'jsdoc/require-description': [JSDOC_RULES_LEVEL, { contexts }], | ||
'jsdoc/require-hyphen-before-param-description': [JSDOC_RULES_LEVEL], | ||
'jsdoc/require-param': [JSDOC_RULES_LEVEL, { contexts, checkDestructured: false }], | ||
'jsdoc/require-param-description': [JSDOC_RULES_LEVEL, { contexts }], | ||
'jsdoc/require-param-name': [JSDOC_RULES_LEVEL, { contexts }], | ||
'jsdoc/require-property': [JSDOC_RULES_LEVEL, { contexts }], | ||
'jsdoc/require-property-description': [JSDOC_RULES_LEVEL, { contexts }], | ||
'jsdoc/require-property-name': [JSDOC_RULES_LEVEL, { contexts }], | ||
'jsdoc/require-returns': 'off', | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters