Skip to content
Snippets Groups Projects
Commit a85278e2 authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Updated style to account for recent JavaScript and React changes and to...

Updated style to account for recent JavaScript and React changes and to automatically disable some warnings in test files.
parent 24df42fb
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ module.exports = {
'jest': true,
},
'parserOptions': {
'ecmaVersion': 2020,
'ecmaVersion': 2022,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true,
......@@ -33,9 +33,6 @@ module.exports = {
'curly': 'warn',
'default-case': [
'warn',
{
'commentPattern': '^no default$',
},
],
'dot-location': ['warn', 'property'],
'dot-notation': 'warn',
......@@ -102,7 +99,9 @@ module.exports = {
},
],
'no-extra-semi': 'warn',
'no-fallthrough': 'warn',
'no-fallthrough': [
'warn',
],
'no-floating-decimal': 'warn',
'no-func-assign': 'warn',
'no-global-assign': 'warn',
......@@ -181,7 +180,7 @@ module.exports = {
},
],
'no-return-assign': 'warn',
'no-return-await': 'warn',
'no-return-await': 'off',
'no-script-url': 'warn',
'no-self-assign': 'warn',
'no-self-compare': 'warn',
......@@ -286,5 +285,18 @@ module.exports = {
'yield-star-spacing': 'warn',
'yoda': 'warn',
},
'overrides': [
{
'files': '*.test.js',
'rules': {
'dot-notation': 'off',
'import/first': 'off',
'no-underscore-dangle': 'off',
'quote-props': 'off',
'require-await': 'off',
'no-magic-numbers': 'off',
},
},
],
'reportUnusedDisableDirectives': true,
};
module.exports = {
"extends": "./base",
"rules": {
"no-magic-numbers": ["warn", {
"ignore": [-1, 0, 0.001, 0.5, 1, 2, 10, 100, 180, 360, 1000, "-1n", "0n", "1n", "2n", "4n"],
"detectObjects": true,
'extends': './base',
'rules': {
'no-magic-numbers': ['warn', {
'ignore': [-1, -0.5, 0, 0.001, 0.5, 1, 2, 10, 100, 180, 360, 1000, '-1n', '0n', '1n', '2n', '4n'],
'detectObjects': true,
}],
},
'overrides': [
{
'files': '*.test.js',
'rules': {
'no-magic-numbers': 'off',
},
},
],
}
This diff is collapsed.
{
"name": "@unlsoft/eslint-config",
"version": "1.0.0",
"version": "3.0.0",
"description": "ESLint configuration used by the UNL SOFT core courses.",
"private": true,
"license": "UNLICENSED",
"devDependencies": {
"eslint": ">= 6"
"eslint": ">= 8"
},
"peerDependencies": {
"eslint": ">= 6"
"eslint": ">= 8"
}
}
module.exports = {
"extends": "./base",
"rules": {
"no-magic-numbers": ["warn", {
"ignore": [-1, 0, 0.001, 0.5, 1, 2, 10, 100, 180, 360, 1000],
"detectObjects": true,
'extends': './base',
'rules': {
'no-magic-numbers': ['warn', {
'ignore': [-1, -0.5, 0, 0.001, 0.5, 1, 2, 10, 100, 180, 360, 1000],
'detectObjects': true,
}],
// `testing-library/no-node-access` is currently broken and gives false
// positives on mock implementations that use `props.children`.
'testing-library/no-node-access': 'off',
},
'overrides': [
{
'files': '*.test.js',
'rules': {
'no-magic-numbers': 'off',
},
},
],
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment