Skip to content

Commit

Permalink
Require Node.js 16
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 15, 2023
1 parent 4bf9631 commit 004e3b3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -10,9 +10,9 @@ jobs:
fail-fast: false
matrix:
node-version:
- 20
- 18
- 16
- 14
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
3 changes: 3 additions & 0 deletions config/plugins.cjs
Expand Up @@ -153,6 +153,9 @@ module.exports = {
},
],

// Temporarily disabled because it's buggy with TypeScript: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2175
'unicorn/no-empty-file': 'off',

// TODO: Disabled for now until it becomes more stable: https://github.com/sindresorhus/eslint-plugin-unicorn/search?q=consistent-destructuring+is:issue&state=open&type=issues
'unicorn/consistent-destructuring': 'off',

Expand Down
43 changes: 19 additions & 24 deletions package.json
Expand Up @@ -13,7 +13,7 @@
"type": "module",
"bin": "./cli.js",
"engines": {
"node": ">=14.16"
"node": ">=16"
},
"scripts": {
"test:clean": "find ./test -type d -name 'node_modules' -prune -not -path ./test/fixtures/project/node_modules -exec rm -rf '{}' +",
Expand Down Expand Up @@ -52,59 +52,54 @@
"javascript",
"typescript"
],
"bundledDependencies": [
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser",
"eslint-config-xo-typescript"
],
"dependencies": {
"@eslint/eslintrc": "^1.3.3",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"@eslint/eslintrc": "^2.1.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"arrify": "^3.0.0",
"cosmiconfig": "^8.1.3",
"cosmiconfig": "^8.2.0",
"define-lazy-prop": "^3.0.0",
"eslint": "^8.37.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-xo": "^0.43.1",
"eslint-config-xo-typescript": "^0.57.0",
"eslint-config-xo-typescript": "^1.0.0",
"eslint-formatter-pretty": "^5.0.0",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-ava": "^14.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-unicorn": "^48.0.0",
"esm-utils": "^4.1.2",
"find-cache-dir": "^4.0.0",
"find-up": "^6.3.0",
"get-stdin": "^9.0.0",
"get-tsconfig": "^4.5.0",
"globby": "^13.1.2",
"get-tsconfig": "^4.6.2",
"globby": "^13.2.2",
"imurmurhash": "^0.1.4",
"json-stable-stringify-without-jsonify": "^1.0.1",
"lodash-es": "^4.17.21",
"meow": "^11.0.0",
"meow": "^12.0.1",
"micromatch": "^4.0.5",
"open-editor": "^4.0.0",
"prettier": "^2.8.7",
"semver": "^7.3.8",
"slash": "^5.0.0",
"prettier": "^3.0.0",
"semver": "^7.5.4",
"slash": "^5.1.0",
"to-absolute-glob": "^3.0.0",
"typescript": "^5.0.3"
"typescript": "^5.1.6"
},
"devDependencies": {
"ava": "^5.1.0",
"ava": "^5.3.1",
"eslint-config-xo-react": "^0.27.0",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"execa": "^7.1.1",
"nyc": "^15.1.0",
"proxyquire": "^2.1.3",
"temp-write": "^5.0.0",
"webpack": "^5.77.0"
"webpack": "^5.88.1"
},
"xo": {
"ignores": [
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -39,8 +39,8 @@ It uses [ESLint](https://eslint.org) underneath, so issues regarding built-in ru

## Install

```
$ npm install xo --save-dev
```sh
npm install xo --save-dev
```

*You must install XO locally. You can run it directly with `$ npx xo`.*
Expand Down
8 changes: 4 additions & 4 deletions test/options-manager.js
Expand Up @@ -99,7 +99,7 @@ test('buildConfig: prettier: true', t => {
trailingComma: 'all',
}]);
// eslint-prettier-config must always be last
t.is(config.baseConfig.extends[config.baseConfig.extends.length - 1], 'plugin:prettier/recommended');
t.is(config.baseConfig.extends.at(-1), 'plugin:prettier/recommended');
// Indent rule is not enabled
t.is(config.baseConfig.rules.indent, undefined);
// Semi rule is not enabled
Expand All @@ -125,8 +125,8 @@ test('buildConfig: prettier: true, typescript file', t => {
}]);

// eslint-prettier-config must always be last
t.is(config.baseConfig.extends[config.baseConfig.extends.length - 1], 'plugin:prettier/recommended');
t.regex(config.baseConfig.extends[config.baseConfig.extends.length - 2], /xo-typescript/);
t.is(config.baseConfig.extends.at(-1), 'plugin:prettier/recommended');
t.regex(config.baseConfig.extends.at(-2), /xo-typescript/);

// Indent rule is not enabled
t.is(config.baseConfig.rules.indent, undefined);
Expand Down Expand Up @@ -430,7 +430,7 @@ test('buildConfig: extends', t => {
test('buildConfig: typescript', t => {
const config = manager.buildConfig({ts: true, tsConfigPath: './tsconfig.json'});

t.regex(config.baseConfig.extends[config.baseConfig.extends.length - 1], /xo-typescript/);
t.regex(config.baseConfig.extends.at(-1), /xo-typescript/);
t.is(config.baseConfig.parser, require.resolve('@typescript-eslint/parser'));
t.deepEqual(config.baseConfig.parserOptions, {
warnOnUnsupportedTypeScriptVersion: false,
Expand Down

0 comments on commit 004e3b3

Please sign in to comment.