Skip to content

Commit

Permalink
lint: apply standard 13
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Oct 24, 2021
1 parent af24454 commit 5e8d1bb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
run: |
# eslint for linting
# - remove on Node.js < 10
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 6 ]]; then
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 8 ]]; then
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
grep -E '^eslint(-|$)' | \
sort -r | \
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
},
"devDependencies": {
"deep-equal": "1.0.1",
"eslint": "5.16.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.14.0",
"eslint": "6.8.0",
"eslint-config-standard": "13.0.1",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-markdown": "1.0.0-rc.1",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.0.0",
"istanbul": "0.4.5",
"mocha": "6.2.3"
Expand Down
18 changes: 9 additions & 9 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,36 +336,36 @@ describe('contentDisposition.parse(string)', function () {
it('should parse UTF-8 extended parameter value', function () {
deepEqual(contentDisposition.parse('attachment; filename*=UTF-8\'\'%E2%82%AC%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '€ rates.pdf' }
parameters: { filename: '€ rates.pdf' }
})
})

it('should parse UTF-8 extended parameter value', function () {
deepEqual(contentDisposition.parse('attachment; filename*=UTF-8\'\'%E2%82%AC%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '€ rates.pdf' }
parameters: { filename: '€ rates.pdf' }
})
deepEqual(contentDisposition.parse('attachment; filename*=UTF-8\'\'%E4%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '\ufffd rates.pdf' }
parameters: { filename: '\ufffd rates.pdf' }
})
})

it('should parse ISO-8859-1 extended parameter value', function () {
deepEqual(contentDisposition.parse('attachment; filename*=ISO-8859-1\'\'%A3%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '£ rates.pdf' }
parameters: { filename: '£ rates.pdf' }
})
deepEqual(contentDisposition.parse('attachment; filename*=ISO-8859-1\'\'%82%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '? rates.pdf' }
parameters: { filename: '? rates.pdf' }
})
})

it('should not be case-sensitive for charser', function () {
deepEqual(contentDisposition.parse('attachment; filename*=utf-8\'\'%E2%82%AC%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '€ rates.pdf' }
parameters: { filename: '€ rates.pdf' }
})
})

Expand All @@ -377,18 +377,18 @@ describe('contentDisposition.parse(string)', function () {
it('should parse with embedded language', function () {
deepEqual(contentDisposition.parse('attachment; filename*=UTF-8\'en\'%E2%82%AC%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '€ rates.pdf' }
parameters: { filename: '€ rates.pdf' }
})
})

it('should prefer extended parameter value', function () {
deepEqual(contentDisposition.parse('attachment; filename="EURO rates.pdf"; filename*=UTF-8\'\'%E2%82%AC%20rates.pdf'), {
type: 'attachment',
parameters: { 'filename': '€ rates.pdf' }
parameters: { filename: '€ rates.pdf' }
})
deepEqual(contentDisposition.parse('attachment; filename*=UTF-8\'\'%E2%82%AC%20rates.pdf; filename="EURO rates.pdf"'), {
type: 'attachment',
parameters: { 'filename': '€ rates.pdf' }
parameters: { filename: '€ rates.pdf' }
})
})
})
Expand Down

0 comments on commit 5e8d1bb

Please sign in to comment.