diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 0000000..72c4429 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1 @@ +npm test diff --git a/.nvmrc b/.nvmrc index 19c7bdb..2edeafb 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 \ No newline at end of file +20 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index f386433..bce9a1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: focal version: ~> 1.0 language: node_js node_js: - - 16 + - 20 branches: only: - master diff --git a/demo/test/snapshots/linting-config.test.js.md b/demo/test/snapshots/linting-config.test.js.md index 7e8e442..79491f6 100644 --- a/demo/test/snapshots/linting-config.test.js.md +++ b/demo/test/snapshots/linting-config.test.js.md @@ -10,6 +10,7 @@ Generated by [AVA](https://ava.li). `{␊ "env": {␊ + "jest/globals": true,␊ "es2021": true,␊ "es6": true,␊ "node": true,␊ @@ -39,6 +40,8 @@ Generated by [AVA](https://ava.li). "import",␊ "@babel",␊ "jsdoc",␊ + "@fs/zion",␊ + "jest",␊ "you-dont-need-lodash-underscore",␊ "prettier",␊ "test-selectors",␊ @@ -64,6 +67,12 @@ Generated by [AVA](https://ava.li). "@babel/semi": [␊ "off"␊ ],␊ + "@fs/zion/logical-over-directional": [␊ + "warn"␊ + ],␊ + "@fs/zion/prefer-zion-render": [␊ + "off"␊ + ],␊ "@typescript-eslint/block-spacing": [␊ "off"␊ ],␊ @@ -496,7 +505,8 @@ Generated by [AVA](https://ava.li). {␊ "maxDepth": "∞",␊ "ignoreExternal": false,␊ - "allowUnsafeDynamicCyclicDependency": false␊ + "allowUnsafeDynamicCyclicDependency": false,␊ + "disableScc": false␊ }␊ ],␊ "import/no-default-export": [␊ @@ -670,6 +680,63 @@ Generated by [AVA](https://ava.li). "init-declarations": [␊ "off"␊ ],␊ + "jest/expect-expect": [␊ + "warn"␊ + ],␊ + "jest/no-alias-methods": [␊ + "error"␊ + ],␊ + "jest/no-commented-out-tests": [␊ + "warn"␊ + ],␊ + "jest/no-conditional-expect": [␊ + "error"␊ + ],␊ + "jest/no-deprecated-functions": [␊ + "error"␊ + ],␊ + "jest/no-disabled-tests": [␊ + "warn"␊ + ],␊ + "jest/no-done-callback": [␊ + "error"␊ + ],␊ + "jest/no-export": [␊ + "error"␊ + ],␊ + "jest/no-focused-tests": [␊ + "error"␊ + ],␊ + "jest/no-identical-title": [␊ + "error"␊ + ],␊ + "jest/no-interpolation-in-snapshots": [␊ + "error"␊ + ],␊ + "jest/no-jasmine-globals": [␊ + "error"␊ + ],␊ + "jest/no-mocks-import": [␊ + "error"␊ + ],␊ + "jest/no-standalone-expect": [␊ + "error"␊ + ],␊ + "jest/no-test-prefixes": [␊ + "error"␊ + ],␊ + "jest/valid-describe-callback": [␊ + "error"␊ + ],␊ + "jest/valid-expect": [␊ + "error"␊ + ],␊ + "jest/valid-expect-in-promise": [␊ + "error"␊ + ],␊ + "jest/valid-title": [␊ + "error"␊ + ],␊ "jsdoc/check-alignment": [␊ "warn"␊ ],␊ @@ -2317,7 +2384,7 @@ Generated by [AVA](https://ava.li). {␊ "ignoreRefs": true,␊ "allowArrowFunctions": true,␊ - "allowFunctions": false,␊ + "allowFunctions": true,␊ "allowBind": false,␊ "ignoreDOMComponents": true␊ }␊ @@ -3185,6 +3252,9 @@ Generated by [AVA](https://ava.li). "you-dont-need-lodash-underscore/chunk": [␊ "off"␊ ],␊ + "you-dont-need-lodash-underscore/clone-deep": [␊ + 2␊ + ],␊ "you-dont-need-lodash-underscore/collect": [␊ 1␊ ],␊ @@ -3424,7 +3494,9 @@ Generated by [AVA](https://ava.li). ".mts",␊ ".tsx",␊ ".js",␊ - ".jsx"␊ + ".jsx",␊ + ".mjs",␊ + ".cjs"␊ ],␊ "import/external-module-folders": [␊ "node_modules",␊ @@ -3446,7 +3518,9 @@ Generated by [AVA](https://ava.li). ".mts",␊ ".tsx",␊ ".js",␊ - ".jsx"␊ + ".jsx",␊ + ".mjs",␊ + ".cjs"␊ ]␊ }␊ },␊ diff --git a/demo/test/snapshots/linting-config.test.js.snap b/demo/test/snapshots/linting-config.test.js.snap index ea5665d..d574601 100644 Binary files a/demo/test/snapshots/linting-config.test.js.snap and b/demo/test/snapshots/linting-config.test.js.snap differ diff --git a/es6.js b/es6.js index ea82539..daeb262 100644 --- a/es6.js +++ b/es6.js @@ -11,6 +11,7 @@ module.exports = { '@fs/eslint-config-frontier-react/es6', '@fs/eslint-config-frontier-react/json', '@fs/eslint-config-frontier-react/jsdoc', + '@fs/eslint-config-frontier-react/jest', '@fs/eslint-config-frontier-react/dont-need-lodash', '@fs/eslint-config-frontier-react/typescript', '@fs/eslint-config-frontier-react/prettierSetup', // Always have prettier last so it can override format rules in the extends before it @@ -98,7 +99,6 @@ module.exports = { overrides: [ { files: ['*.stories.*', '*test*', '**/test/**', '**/*mock*/**', '*mock*', '**/setupTests.*', '**/fixtures/**'], - extends: ['@fs/eslint-config-frontier-react/jest'], rules: { 'no-alert': 'off', 'no-console': 'off', diff --git a/package.json b/package.json index a88fcd1..67019a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fs/eslint-config-tree", - "version": "6.0.1", + "version": "6.1.0", "description": "Shared Tree configuration that contains overrides and enhancements on top of the base frontier configuration.", "main": "index.js", "repository": { @@ -28,26 +28,21 @@ "!.*" ], "dependencies": { - "@babel/eslint-parser": "^7.23.3", - "@fs/eslint-config-frontier-react": "^11.0.0", - "eslint": "^8.55.0", + "@babel/eslint-parser": "^7.25.1", + "@fs/eslint-config-frontier-react": "^11.2.0", + "eslint": "^8.57.1", "eslint-plugin-bestpractices": "github:skye2k2/eslint-plugin-bestpractices", "eslint-plugin-deprecate": "^0.7.0", "eslint-plugin-html": "^7.1.0", - "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-promise": "^6.6.0", "eslint-plugin-sonarjs": "^0.22.0", "eslint-plugin-test-selectors": "^2.1.1" }, "devDependencies": { - "@fs/npm-publisher": "^1.5.2", + "@fs/npm-publisher": "^1.6.0", "ava": "^2.4.0", "file-manager-js": "^3.1.6", - "husky": "^3.1.0" - }, - "husky": { - "hooks": { - "pre-push": "npm test" - } + "husky": "^9.1.6" }, "scripts": { "lint": "eslint demo", @@ -55,10 +50,10 @@ "lint:quiet": "eslint demo --quiet", "lint:report": "eslint demo '**/*.html' --format html --output-file ./reports/linting/linting_report.html & eslint demo --format json --output-file ./reports/linting/linting_report.json", "lint:snapshot": "eslint --print-config file.js > ./demo/test/snapshots/local-linting-final-config.json; eslint demo --no-color --output-file ./demo/test/snapshots/local-linting-output.txt; npm run test:format", - "postinstall": "npm rebuild husky", "publish": "npmPublish", "test": "npm run lint:snapshot; ava", "test:format": "node demo/test/snapshots/format-config.js", - "test:update": "npm run lint:snapshot; ava --update-snapshots" + "test:update": "npm run lint:snapshot; ava --update-snapshots", + "prepare": "husky" } }