xo 0.33.1 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli-main.js CHANGED
@@ -136,7 +136,7 @@ if (typeof options.space === 'string') {
136
136
  }
137
137
 
138
138
  const log = report => {
139
- const reporter = options.reporter ? xo.getFormatter(options.reporter) : formatterPretty;
139
+ const reporter = options.reporter || process.env.GITHUB_ACTIONS ? xo.getFormatter(options.reporter || 'compact') : formatterPretty;
140
140
  process.stdout.write(reporter(report.results));
141
141
  process.exitCode = report.errorCount === 0 ? 0 : 1;
142
142
  };
package/config/plugins.js CHANGED
@@ -3,7 +3,7 @@
3
3
  module.exports = {
4
4
  // Repeated here from eslint-config-xo in case some plugins set something different
5
5
  parserOptions: {
6
- ecmaVersion: 2020,
6
+ ecmaVersion: 2021,
7
7
  sourceType: 'module',
8
8
  ecmaFeatures: {
9
9
  jsx: true
@@ -238,7 +238,11 @@ module.exports = {
238
238
  allow: [
239
239
  '@babel/polyfill',
240
240
  '**/register',
241
- '**/register/**'
241
+ '**/register/**',
242
+ '**/*.css',
243
+ '**/*.scss',
244
+ '**/*.sass',
245
+ '**/*.less'
242
246
  ]
243
247
  }
244
248
  ],
@@ -243,7 +243,7 @@ const mergeOptions = (options, xoOptions = {}, enginesOptions = {}) => {
243
243
  ...options
244
244
  });
245
245
 
246
- mergedOptions.extensions = DEFAULT_EXTENSION.concat(options.extensions || []);
246
+ mergedOptions.extensions = DEFAULT_EXTENSION.concat(mergedOptions.extensions || []);
247
247
  mergedOptions.ignores = getIgnores(mergedOptions);
248
248
 
249
249
  return mergedOptions;
@@ -315,6 +315,10 @@ const buildXOConfig = options => config => {
315
315
  ];
316
316
  }
317
317
 
318
+ if (options.ts) {
319
+ config.rules['unicorn/import-style'] = 'off';
320
+ }
321
+
318
322
  if (options.rules) {
319
323
  Object.assign(config.rules, options.rules);
320
324
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xo",
3
- "version": "0.33.1",
3
+ "version": "0.35.0",
4
4
  "description": "JavaScript/TypeScript linter with great defaults",
5
5
  "license": "MIT",
6
6
  "repository": "xojs/xo",
@@ -51,28 +51,28 @@
51
51
  "typescript"
52
52
  ],
53
53
  "dependencies": {
54
- "@typescript-eslint/eslint-plugin": "^3.9.0",
55
- "@typescript-eslint/parser": "^3.9.0",
54
+ "@typescript-eslint/eslint-plugin": "^4.8.1",
55
+ "@typescript-eslint/parser": "^4.8.1",
56
56
  "arrify": "^2.0.1",
57
57
  "cosmiconfig": "^7.0.0",
58
- "debug": "^4.1.1",
59
- "eslint": "^7.6.0",
60
- "eslint-config-prettier": "^6.11.0",
61
- "eslint-config-xo": "^0.32.1",
62
- "eslint-config-xo-typescript": "^0.32.0",
58
+ "debug": "^4.3.1",
59
+ "eslint": "^7.13.0",
60
+ "eslint-config-prettier": "^6.15.0",
61
+ "eslint-config-xo": "^0.33.1",
62
+ "eslint-config-xo-typescript": "^0.36.0",
63
63
  "eslint-formatter-pretty": "^4.0.0",
64
- "eslint-import-resolver-webpack": "^0.12.1",
65
- "eslint-plugin-ava": "^10.5.0",
64
+ "eslint-import-resolver-webpack": "^0.13.0",
65
+ "eslint-plugin-ava": "^11.0.0",
66
66
  "eslint-plugin-eslint-comments": "^3.2.0",
67
- "eslint-plugin-import": "^2.20.2",
67
+ "eslint-plugin-import": "^2.22.1",
68
68
  "eslint-plugin-no-use-extend-native": "^0.5.0",
69
69
  "eslint-plugin-node": "^11.1.0",
70
- "eslint-plugin-prettier": "^3.1.3",
70
+ "eslint-plugin-prettier": "^3.1.4",
71
71
  "eslint-plugin-promise": "^4.2.1",
72
- "eslint-plugin-unicorn": "^21.0.0",
72
+ "eslint-plugin-unicorn": "^23.0.0",
73
73
  "find-cache-dir": "^3.3.1",
74
- "find-up": "^4.1.0",
75
- "fs-extra": "^9.0.0",
74
+ "find-up": "^5.0.0",
75
+ "fs-extra": "^9.0.1",
76
76
  "get-stdin": "^8.0.0",
77
77
  "globby": "^9.0.0",
78
78
  "has-flag": "^4.0.0",
@@ -80,34 +80,34 @@
80
80
  "is-path-inside": "^3.0.2",
81
81
  "json-stable-stringify-without-jsonify": "^1.0.1",
82
82
  "json5": "^2.1.3",
83
- "lodash": "^4.17.19",
84
- "meow": "^7.0.1",
83
+ "lodash": "^4.17.20",
84
+ "meow": "^8.0.0",
85
85
  "micromatch": "^4.0.2",
86
86
  "open-editor": "^2.0.1",
87
87
  "p-reduce": "^2.1.0",
88
88
  "path-exists": "^4.0.0",
89
- "prettier": "2.0.4",
89
+ "prettier": "^2.1.2",
90
90
  "resolve-cwd": "^3.0.0",
91
91
  "resolve-from": "^5.0.0",
92
92
  "semver": "^7.3.2",
93
93
  "slash": "^3.0.0",
94
94
  "to-absolute-glob": "^2.0.2",
95
- "typescript": "^3.9.7",
96
- "update-notifier": "^4.1.0"
95
+ "typescript": "^4.1.2",
96
+ "update-notifier": "^5.0.1"
97
97
  },
98
98
  "devDependencies": {
99
- "ava": "^3.9.0",
99
+ "ava": "^3.13.0",
100
100
  "coveralls": "^3.1.0",
101
101
  "eslint-config-xo-react": "^0.23.0",
102
- "eslint-plugin-react": "^7.20.5",
103
- "eslint-plugin-react-hooks": "^4.0.8",
102
+ "eslint-plugin-react": "^7.21.5",
103
+ "eslint-plugin-react-hooks": "^4.2.0",
104
104
  "esm": "^3.2.25",
105
- "execa": "^4.0.3",
105
+ "execa": "^4.1.0",
106
106
  "nyc": "^15.1.0",
107
107
  "pify": "^5.0.0",
108
108
  "proxyquire": "^2.1.3",
109
109
  "temp-write": "^4.0.0",
110
- "webpack": "^4.44.1"
110
+ "webpack": "^5.6.0"
111
111
  },
112
112
  "eslintConfig": {
113
113
  "extends": "eslint-config-xo"