diff --git a/.editorconfig b/.editorconfig index 4a7ea30..ffde708 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,12 +1,14 @@ root = true [*] +charset = utf-8 + +[*.{js,json}] indent_style = space indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true +end_of_line = lf insert_final_newline = true +trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index dba6cd3..0000000 --- a/.eslintrc +++ /dev/null @@ -1,26 +0,0 @@ -root: true - -env: - node: true - es6: true - -parserOptions: - ecmaVersion: 2018 - sourceType: module - ecmaFeatures: - globalReturn: true - impliedStrict: true - -extends: - - "eslint:recommended" - - prettier - -plugins: - - prettier - -rules: - "prettier/prettier": error - camelcase: 0 - no-console: 1 - quotes: [2, "single", "avoid-escape"] - valid-jsdoc: [1, {requireParamDescription: false, requireReturnDescription: false}] diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..09d8941 --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,8 @@ +env: + node: true + es6: true +extends: + - 'eslint:recommended' + - 'prettier' +parserOptions: + ecmaVersion: 2017 diff --git a/.gitignore b/.gitignore index b512c09..19f120e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -node_modules \ No newline at end of file +node_modules +.nyc_output +coverage.info +test/fixtures/*/build +*.tgz \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..f416f42 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +package-lock.json = false +sign-git-tag = true +message = Bump package.json to %s \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 3ad954a..3d657a7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,2 @@ -package-lock.json -package.json +test/fixtures/** +.nyc_output/** \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 0176969..0000000 --- a/.prettierrc +++ /dev/null @@ -1 +0,0 @@ -singleQuote: true diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 0000000..944eeea --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,7 @@ +trailingComma: none +tabWidth: 2 +semi: false +singleQuote: true +bracketSpacing: true +arrowParens: always +printWidth: 120 diff --git a/.release-it.json b/.release-it.json new file mode 100644 index 0000000..9d2f69b --- /dev/null +++ b/.release-it.json @@ -0,0 +1,24 @@ +{ + "hooks": { + "before:init": ["npm run lint", "npm test"], + "after:bump": "auto-changelog --sort-commits date -p --starting-date 2021-12-01 --commit-limit false --ignore-commit-pattern '(skip changelog|Release)'", + "after:npm:bump": "npm pack", + "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}." + }, + "git": { + "commitMessage": "Release ${version}", + "commitArgs": ["-S"], + "tagAnnotation": "Release ${version}", + "tagArgs": ["-s"], + "changelog": "auto-changelog --sort-commits date -u --starting-date 2021-12-01 --commit-limit false --ignore-commit-pattern '(skip changelog|Release)' --stdout" + }, + "npm": { + "publish": false + }, + "github": { + "release": true, + "releaseName": "@metalsmith/markdown ${version}", + "tokenRef": "GITHUB_TOKEN", + "assets": ["metalsmith-markdown-${version}.tgz"] + } +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6e70781 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: node_js +dist: xenial + +node_js: + - node + - 16 + - 12 + - 8 + +os: + - linux + - windows + +jobs: + include: + - name: lint + script: npm run lint + - name: coveralls + script: npm run test && npm run coveralls + +script: npm run test diff --git a/History.md b/CHANGELOG.md similarity index 61% rename from History.md rename to CHANGELOG.md index 15a089c..cb708e1 100644 --- a/History.md +++ b/CHANGELOG.md @@ -78,13 +78,13 @@ Check for [unreleased][] changes. --- -[unreleased]: https://github.com/segmentio/metalsmith-markdown/compare/v1.2.0...HEAD -[1.3.0]: https://github.com/segmentio/metalsmith-markdown/compare/v1.2.0...v1.3.0 -[1.2.0]: https://github.com/segmentio/metalsmith-markdown/compare/v1.1.0...v1.2.0 -[1.1.0]: https://github.com/segmentio/metalsmith-markdown/compare/v1.0.1...v1.1.0 -[1.0.1]: https://github.com/segmentio/metalsmith-markdown/compare/v1.0.0...v1.0.1 -[1.0.0]: https://github.com/segmentio/metalsmith-markdown/compare/v0.2.2...v1.0.0 -[0.2.2]: https://github.com/segmentio/metalsmith-markdown/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/segmentio/metalsmith-markdown/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/segmentio/metalsmith-markdown/compare/v0.1.0...v0.2.0 -[0.1.0]: https://github.com/segmentio/metalsmith-markdown/compare/v0.0.1...v0.1.0 +[unreleased]: https://github.com/metalsmith/markdown/compare/v1.2.0...HEAD +[1.3.0]: https://github.com/metalsmith/markdown/compare/v1.2.0...v1.3.0 +[1.2.0]: https://github.com/metalsmith/markdown/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/metalsmith/markdown/compare/v1.0.1...v1.1.0 +[1.0.1]: https://github.com/metalsmith/markdown/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/metalsmith/markdown/compare/v0.2.2...v1.0.0 +[0.2.2]: https://github.com/metalsmith/markdown/compare/v0.2.1...v0.2.2 +[0.2.1]: https://github.com/metalsmith/markdown/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/metalsmith/markdown/compare/v0.1.0...v0.2.0 +[0.1.0]: https://github.com/metalsmith/markdown/compare/v0.0.1...v0.1.0 diff --git a/Readme.md b/README.md similarity index 100% rename from Readme.md rename to README.md diff --git a/test/index.js b/test/index.js index 0ef856d..8b5898d 100644 --- a/test/index.js +++ b/test/index.js @@ -5,7 +5,7 @@ var equal = require('assert-dir-equal'); var Metalsmith = require('metalsmith'); var markdown = require('..'); -describe('metalsmith-markdown', function() { +describe('@metalsmith/markdown', function() { it('should convert markdown files', function(done) { Metalsmith('test/fixtures/basic') .use(