Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aborazmeh committed Jul 7, 2024
0 parents commit 9d16590
Show file tree
Hide file tree
Showing 9 changed files with 5,672 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test
on: [push, pull_request]
env:
CI: true
jobs:
test:
name: "Test on Node.js ${{ matrix.node-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.19, 20 ]
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn install
- name: Test
run: yarn test
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
### https://raw.github.com/github/gitignore/608690d6b9a78c2a003affc792e49a84905b3118/Node.gitignore

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Debug log from npm
npm-debug.log

# Publish src/ instead lib/
/lib
9 changes: 9 additions & 0 deletions License
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# The MIT License

Copyright 2024 aborazmeh, contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# textlint-rule-no-curly-quotes [![Actions Status: test](https://github.com/aborazmeh/textlint-rule-no-curly-quotes/workflows/test/badge.svg)](https://github.com/aborazmeh/textlint-rule-no-curly-quotes/actions?query=workflow%3A"test") [![textlint rule](https://img.shields.io/badge/textlint-fixable-green.svg?style=social)](https://textlint.github.io/)

Prevents the usage of curly quotation marks, and replace them to normal ascii ones.

The purpose of this package is to use ascii characters in editor, and convert them to curly symbols if you want in rendering using a parser which supports this like `Typographer` extension of [goldmark](https://github.com/yuin/goldmark) or [smartypants](https://daringfireball.net/projects/smartypants/).

This is the opposite of [textlint-rule-quotes](https://github.com/sapegin/textlint-rule-quotes), and you probably won't to stop one of them as they contradict.

|Character|Replacement|
|-|-|
|``|`"`|
|``|`"`|
|``|`'`|
|``|`'`|

## Install

Install with [npm](https://www.npmjs.com/):

npm install textlint-rule-no-curly-quotes

## Usage

Via `.textlintrc.json`(Recommended)

```json
{
"rules": {
"no-curly-quotes": true
}
}
```

Via CLI

```
textlint --rule no-curly-quotes README.md
```
### Build

Builds source codes for publish to the `lib` folder.
You can write ES2015+ source codes in `src/` folder.

npm run build

### Tests

Run test code in `test` folder.
Test textlint rule by [textlint-tester](https://github.com/textlint/textlint-tester).

npm test

## License

MIT © aborazmeh
Loading

0 comments on commit 9d16590

Please sign in to comment.