Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial migration to azure #160

Merged
merged 5 commits into from Feb 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 0 additions & 14 deletions .babelrc

This file was deleted.

38 changes: 0 additions & 38 deletions .eslintrc

This file was deleted.

16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@ eslint-plugin-flowtype-errors
=============================

[![Build Status](https://travis-ci.org/amilajack/eslint-plugin-flowtype-errors.svg?branch=master)](https://travis-ci.org/amilajack/eslint-plugin-flowtype-errors)
[![Build status](https://ci.appveyor.com/api/projects/status/ag1pm0a914bed8c8/branch/master?svg=true)](https://ci.appveyor.com/project/amilajack/eslint-plugin-flowtype-errors/branch/master)
[![Build Status](https://dev.azure.com/amilajack0438/amilajack/_apis/build/status/amilajack.eslint-plugin-flowtype-errors?branchName=master)](https://dev.azure.com/amilajack0438/amilajack/_build/latest?definitionId=1&branchName=master)
[![NPM version](https://badge.fury.io/js/eslint-plugin-flowtype-errors.svg)](http://badge.fury.io/js/eslint-plugin-flowtype-errors)
[![Dependency Status](https://img.shields.io/david/amilajack/eslint-plugin-flowtype-errors.svg)](https://david-dm.org/amilajack/eslint-plugin-flowtype-errors)
[![npm](https://img.shields.io/npm/dm/eslint-plugin-flowtype-errors.svg)](https://npm-stat.com/charts.html?package=eslint-plugin-flowtype-errors)
Expand Down
29 changes: 0 additions & 29 deletions appveyor.yml

This file was deleted.

24 changes: 11 additions & 13 deletions azure-pipelines.yml
@@ -1,21 +1,19 @@
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
- master
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
mac:
imageName: 'macos-10.13'
windows:
imageName: 'vs2017-win2016'

pool:
vmImage: 'Ubuntu-16.04'
vmImage: $(imageName)

steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
versionSpec: '10.x'

- script: |
npm install
npm run build
displayName: 'npm install and build'
yarn && yarn test
2 changes: 1 addition & 1 deletion index.js
@@ -1,2 +1,2 @@
/* eslint-disable */
module.exports = require('./dist/index');
module.exports = require('./dist/index').default;
114 changes: 82 additions & 32 deletions package.json
Expand Up @@ -3,9 +3,7 @@
"version": "3.6.0",
"description": "Retrieve Flow errors as ESLint errors.",
"author": "Amila Welihinda",
"bugs": {
"url": "https://github.com/amilajack/eslint-plugin-flowtype-errors/issues"
},
"bugs": "https://github.com/amilajack/eslint-plugin-flowtype-errors/issues",
"homepage": "https://github.com/amilajack/eslint-plugin-flowtype-errors#readme",
"main": "index.js",
"scripts": {
Expand All @@ -14,13 +12,10 @@
"lint": "eslint --cache --format=node_modules/eslint-formatter-pretty .",
"prettier": "prettier --single-quote --write \"./src/*.js\"",
"preversion": "yarn build",
"spec": "yarn build && jest test/format.spec.js",
"spec": "yarn build && jest",
"test": "yarn flow && yarn lint && yarn spec"
},
"repository": {
"type": "git",
"url": "git+https://github.com/amilajack/eslint-plugin-flowtype-errors.git"
},
"repository": "https://github.com/amilajack/eslint-plugin-flowtype-errors",
"jest": {
"testEnvironment": "node"
},
Expand All @@ -35,39 +30,37 @@
"dist"
],
"dependencies": {
"babel-runtime": "^6.26.0",
"@babel/runtime": "^7.0.0",
"find-up": "^3.0.0",
"slash": "^2.0.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.4.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-flow": "^6.23.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-flow": "^7.0.0",
"@babel/register": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"chai": "^4.2.0",
"cross-env": "^5.2.0",
"cross-spawn": "^6.0.5",
"eslint": "4.19.1",
"eslint": "5.14.1",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-prettier": "^3.0.1",
"eslint-formatter-pretty": "^1.3.0",
"eslint-nibble-ignore": "^3.0.0",
"eslint-plugin-flowtype": "^2.50.0",
"eslint-plugin-html": "^4.0.5",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-vue": "^4.7.1",
"eslint-config-prettier": "^4.0.0",
"eslint-formatter-pretty": "^2.1.1",
"eslint-plugin-flowtype": "^3.4.2",
"eslint-plugin-html": "^5.0.3",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-vue": "^5.2.2",
"execa": "^1.0.0",
"flow-bin": "0.93.0",
"jest-cli": "^23.5.0",
"prettier": "^1.14.2",
"regenerator-runtime": "^0.12.1"
"jest-cli": "^24.1.0",
"prettier": "^1.16.4",
"regenerator-runtime": "^0.13.1"
},
"peerDependencies": {
"eslint": ">=4.0.0",
Expand All @@ -76,5 +69,62 @@
"engines": {
"node": ">=4.x",
"npm": ">=5.x"
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": 10
},
"useBuiltIns": "usage"
}
],
"@babel/preset-flow"
]
},
"eslintConfig": {
"extends": [
"airbnb-base",
"prettier",
"prettier/flowtype"
],
"parser": "babel-eslint",
"env": {
"node": true,
"es6": true
},
"plugins": [
"flowtype",
"prettier"
],
"rules": {
"consistent-return": "off",
"flowtype/define-flow-type": "error",
"fp/no-arguments": "off",
"fp/no-class": "off",
"fp/no-delete": "off",
"fp/no-events": "off",
"fp/no-get-set": "off",
"fp/no-let": "off",
"fp/no-loops": "off",
"fp/no-mutating-assign": "off",
"fp/no-mutating-methods": "off",
"fp/no-mutation": "off",
"fp/no-nil": "off",
"fp/no-proxy": "off",
"fp/no-rest-parameters": "off",
"fp/no-this": "off",
"fp/no-throw": "off",
"fp/no-unused-expression": "off",
"fp/no-valueof-field": "off",
"prefer-destructuring": "off"
}
},
"renovate": {
"extends": [
"bliss"
]
}
}
3 changes: 0 additions & 3 deletions renovate.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -152,7 +152,7 @@ function createFilteredErrorRule(filter: CollectOutputElement => any) {
};
}

export default {
module.exports = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amilajack This change broke the npm package:

> require('eslint-plugin-flowtype-errors')
undefined

This can be fixed by either using export default again, or by changing the main field in package.json to point to dist/index.js. Not sure which one you'd prefer.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right. I'll fix that now. My bad

rules: {
'enforce-min-coverage': function enforceMinCoverage(
context: EslintContext
Expand Down
24 changes: 20 additions & 4 deletions test/__snapshots__/format.spec.js.snap
Expand Up @@ -60,13 +60,29 @@ exports[`Check codebases flow-pragma-2 - eslint should give expected output 1`]
"
`;

exports[`Check codebases folder with spaces - eslint should give expected output 1`] = `""`;

exports[`Check codebases html-support - eslint should give expected output 1`] = `
"
./a.vue
8:15 error Cannot resolve module \`./b.vue\` flowtype-errors/show-errors
14:19 error Cannot assign \`\\"string\\"\` to \`c\` because string is incompatible with number flowtype-errors/show-errors
5:1 error Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?

3 | </template>
4 |
> 5 | <script>
| ^
6 | // @flow
7 |
8 | import B from \\"./b.vue\\";

./b.vue
5:1 error Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?

3 | </template>
4 |
> 5 | <script>
| ^
6 | export default {};
7 | </script>
8 |

✖ 2 problems (2 errors, 0 warnings)

Expand Down