mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-14 09:35:48 +00:00
- Switch files to typescript - Add missing types in test files - Change how the codec functions were imported. They now count towards the "% Funcs" calculation, increasing it from 75% to 100%. - Lint test files
47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
|
|
parser: '@typescript-eslint/parser', // Make ESLint compatible with TypeScript
|
|
parserOptions: {
|
|
// Enable linting rules with type information from our tsconfig
|
|
tsconfigRootDir: __dirname,
|
|
project: ['./tsconfig.eslint.json'],
|
|
|
|
sourceType: 'module', // Allow the use of imports / ES modules
|
|
|
|
ecmaFeatures: {
|
|
impliedStrict: true, // Enable global strict mode
|
|
},
|
|
},
|
|
|
|
// Specify global variables that are predefined
|
|
env: {
|
|
browser: true, // Enable browser global variables
|
|
node: true, // Enable node global variables & Node.js scoping
|
|
es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
|
|
},
|
|
|
|
plugins: [],
|
|
extends: ['@xrplf/eslint-config/base'],
|
|
|
|
rules: {
|
|
// This creates a lot of false positives. We should turn this off in our
|
|
// general config.
|
|
'jsdoc/require-description-complete-sentence': 'off',
|
|
|
|
// ** TODO **
|
|
// all of the below are turned off for now during the migration to a
|
|
// monorepo. They need to actually be addressed!
|
|
// **
|
|
'@typescript-eslint/no-magic-numbers': 'off',
|
|
'jsdoc/require-returns': 'off',
|
|
'jsdoc/check-param-names': 'off',
|
|
'jsdoc/require-throws': 'off',
|
|
'jsdoc/require-jsdoc': 'off',
|
|
'jsdoc/require-param': 'off',
|
|
'jsdoc/check-examples': 'off', // Not implemented in eslint 8
|
|
'tsdoc/syntax': 'off',
|
|
'@typescript-eslint/no-require-imports': 'off',
|
|
},
|
|
}
|