xo 0.32.0 → 0.32.1

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.
Files changed (2) hide show
  1. package/cli-main.js +11 -3
  2. package/package.json +11 -4
package/cli-main.js CHANGED
@@ -46,6 +46,7 @@ const cli = meow(`
46
46
  - Add XO to your project with \`npm init xo\`.
47
47
  - Put options in package.json instead of using flags so other tools can read it.
48
48
  `, {
49
+ autoVersion: false,
49
50
  booleanDefault: undefined,
50
51
  flags: {
51
52
  fix: {
@@ -100,15 +101,14 @@ const cli = meow(`
100
101
  type: 'boolean'
101
102
  },
102
103
  stdinFilename: {
103
- type: 'string',
104
- alias: 'filename'
104
+ type: 'string'
105
105
  }
106
106
  }
107
107
  });
108
108
 
109
109
  updateNotifier({pkg: cli.pkg}).notify();
110
110
 
111
- const {input, flags: options} = cli;
111
+ const {input, flags: options, showVersion} = cli;
112
112
 
113
113
  // Make data types for `options.space` match those of the API
114
114
  // Check for string type because `xo --no-space` sets `options.space` to `false`
@@ -141,6 +141,10 @@ if (input[0] === '-') {
141
141
  input.shift();
142
142
  }
143
143
 
144
+ if (options.version) {
145
+ showVersion();
146
+ }
147
+
144
148
  if (options.nodeVersion) {
145
149
  if (options.nodeVersion === 'false') {
146
150
  options.nodeVersion = false;
@@ -154,6 +158,10 @@ if (options.nodeVersion) {
154
158
  if (options.stdin) {
155
159
  const stdin = await getStdin();
156
160
 
161
+ if (options.stdinFilename) {
162
+ options.filename = options.stdinFilename;
163
+ }
164
+
157
165
  if (options.fix) {
158
166
  const result = xo.lintText(stdin, options).results[0];
159
167
  // If there is no output, pass the stdin back out
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xo",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "JavaScript/TypeScript linter with great defaults",
5
5
  "license": "MIT",
6
6
  "repository": "xojs/xo",
@@ -81,7 +81,7 @@
81
81
  "json-stable-stringify-without-jsonify": "^1.0.1",
82
82
  "json5": "^2.1.3",
83
83
  "lodash": "^4.17.15",
84
- "meow": "^5.0.0",
84
+ "meow": "^7.0.1",
85
85
  "micromatch": "^4.0.2",
86
86
  "open-editor": "^2.0.1",
87
87
  "p-reduce": "^2.1.0",
@@ -96,11 +96,12 @@
96
96
  "update-notifier": "^4.1.0"
97
97
  },
98
98
  "devDependencies": {
99
- "ava": "^1.1.0",
99
+ "ava": "^3.9.0",
100
100
  "coveralls": "^3.1.0",
101
101
  "eslint-config-xo-react": "^0.23.0",
102
102
  "eslint-plugin-react": "^7.20.0",
103
103
  "eslint-plugin-react-hooks": "^4.0.4",
104
+ "esm": "^3.2.25",
104
105
  "execa": "^4.0.2",
105
106
  "nyc": "^15.1.0",
106
107
  "pify": "^5.0.0",
@@ -113,5 +114,11 @@
113
114
  },
114
115
  "eslintIgnore": [
115
116
  "test/fixtures"
116
- ]
117
+ ],
118
+ "ava": {
119
+ "require": [
120
+ "esm"
121
+ ],
122
+ "timeout": "1m"
123
+ }
117
124
  }