Skip to content

Commit

Permalink
chore(deps): eslint-config-codedependant
Browse files Browse the repository at this point in the history
replace legacy lint config package with current codedependant rules
  • Loading branch information
esatterwhite committed Apr 8, 2021
1 parent 7167dcf commit dbe464e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ async function verify(opts, context) {
const error = new SemanticError(
`Unable to locate Dockerfile: ${image.dockerfile}`
, err.code
, 'Docker file is read from a local relative to PWD. Make sure the "dockerfile" option'
+ ' is set to the desired location'
, 'Docker file is read from a local relative to PWD. Make sure the "dockerfile"'
+ ' option is set to the desired location'
)

throw error
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"eslintConfig": {
"root": true,
"extends": "@esatterwhite/eslint-config-reasonable",
"extends": "codedependant",
"ignorePatterns": [
"node_modules/",
"test/fixture/",
Expand Down Expand Up @@ -79,11 +79,11 @@
]
},
"devDependencies": {
"@esatterwhite/eslint-config-reasonable": "^1.0.2",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.0.7",
"eslint": "^7.4.0",
"eslint-config-codedependant": "^2.1.6",
"sinon": "^9.0.2",
"tap": "^14.10.7"
},
Expand Down
5 changes: 4 additions & 1 deletion test/integration/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ test('steps::prepare', async (t) => {
image.clean()
})

const {stdout} = await execa('docker', ['images', image.name, '-q', '--format={{ .Tag }}'])
const {stdout} = await execa('docker', [
'images', image.name
, '-q', '--format={{ .Tag }}'
])
tt.equal(stdout, build_id, 'build image fully built')
})
}).catch(threw)
5 changes: 4 additions & 1 deletion test/integration/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ test('steps::verify', async (t) => {
tt.rejects(verify(config, context), {
code: 'EINVAL'
, name: 'SemanticReleaseError'
, details: /image name parsed from package.json name if possible. or via the "image" option/gi
, details: new RegExp(
'image name parsed from package.json name if possible. or via the "image" option'
, 'gi'
)
})
})

Expand Down
10 changes: 8 additions & 2 deletions test/unit/docker/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ test('Image', async (t) => {
, context: path.join(__dirname, 'fixture')
})
await img.tag('1.0.0', false)
const {stdout} = await execa('docker', ['images', img.repo, '-q', '--format={{ .Tag }}'])
const {stdout} = await execa('docker', [
'images', img.repo
, '-q', '--format={{ .Tag }}'
])
const tags = stdout.split(os.EOL)
tt.deepEqual(tags.sort(), [build_id, '1.0.0'].sort(), 'image tags')
})
Expand All @@ -233,7 +236,10 @@ test('Image', async (t) => {
, dockerfile: path.join('fixture', 'Dockerfile.test')
})
await img.clean()
const {stdout} = await execa('docker', ['images', img.repo, '-q', '--format={{ .Tag }}'])
const {stdout} = await execa('docker', [
'images', img.repo
, '-q', '--format={{ .Tag }}'
])
tt.deepEqual(stdout, '', 'all tags removed')
})

Expand Down

0 comments on commit dbe464e

Please sign in to comment.