Files
canvas-lms/eslint.config.jest.js
Aaron Shafovaloff 970ae48c67 refactor: rename useTranslations to registerTranslations
Removing non-hook usage of "use" functions in order
  to make use of react-hooks eslint rules.

Change-Id: I4977ac41ecc0c55bc6fa40cf4c6351903e59cb27
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/365591
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-12-15 18:15:25 +00:00

31 lines
757 B
JavaScript

const pluginJest = require('eslint-plugin-jest')
module.exports = {
files: [
'**/*.{test,spec}.{js,ts,tsx,jsx}',
'**/test-utils.js',
'**/assertions.js',
'**/testHelpers.js',
'**/__tests__/*',
'**/__mocks__/*',
'jest/**',
'ui/shared/stub-env/index.js',
'ui/boot/initializers/__tests__/configureDateTimeWithI18n.t3st.js',
],
plugins: {jest: pluginJest},
languageOptions: {
globals: {
...pluginJest.environments.globals.globals,
global: true,
},
},
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'warn',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
'react/no-deprecated': 'warn',
},
}