Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

defaults: &defaults
environment:
APM_TEST_PACKAGES: "language-review"
APM_TEST_PACKAGES: "language-review language-latex"
working_directory: /tmp/project
docker:
- image: arcanemagus/atom-docker-ci:stable
Expand Down
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ matrix:
- os: linux
env: ATOM_CHANNEL=stable

- os: linux
env: ATOM_CHANNEL=beta

env:
global:
# Pre-install the required language file as package activation doesn't wait
# for the installation to complete.
- APM_TEST_PACKAGES="language-review"
- APM_TEST_PACKAGES="language-review language-latex"

### Generic setup follows ###
script:
Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
### Project specific config ###
environment:
APM_TEST_PACKAGES: language-review
APM_TEST_PACKAGES: language-review language-latex

matrix:
- ATOM_CHANNEL: stable
- ATOM_CHANNEL: beta

### Generic setup follows ###
build_script:
Expand Down
4 changes: 3 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export function provideLinter() {
'source.re',
'source.review',
'text.plain',
'text.md'
'text.md',
'text.tex',
'text.latex'
],
scope: 'file',
lintsOnChange: false,
Expand Down
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"eslint": "^6.1.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-import": "^2.18.2",
"textlint-plugin-latex2e": "^0.2.2",
"textlint-plugin-review": "^0.3.3"
},
"package-deps": [
Expand Down
3 changes: 2 additions & 1 deletion spec/fixtures/.textlintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"spellcheck-tech-word": true
},
"plugins": [
"review"
"review",
"latex2e"
]
}
5 changes: 5 additions & 0 deletions spec/fixtures/bad.latex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
\documentclass{article}

\begin{document}
HTML Import
\end{document}
12 changes: 12 additions & 0 deletions spec/linter-textlint-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as path from 'path';
const good = path.join(__dirname, 'fixtures', 'good.md');
const markdown = path.join(__dirname, 'fixtures', 'bad.md');
const review = path.join(__dirname, 'fixtures', 'bad.re');
const latex = path.join(__dirname, 'fixtures', 'bad.latex');
const textlintrcPath = path.join(__dirname, 'fixtures', '.textlintrc');
const textlintRulesDir = path.join(__dirname, '..', 'node_modules');

Expand All @@ -18,6 +19,7 @@ describe('The textlint provider for Linter', () => {

const activation = Promise.all([
atom.packages.activatePackage('language-review'),
atom.packages.activatePackage('language-latex'),
atom.packages.activatePackage('linter-textlint')
]);

Expand Down Expand Up @@ -58,6 +60,16 @@ describe('The textlint provider for Linter', () => {
});
});

describe('checks bad.latex and', () => {
it('finds at least one message', () => {
waitsForPromise(() => atom.workspace.open(latex)
.then(editor => lint(editor))
.then((messages) => {
expect(messages.length).toBeGreaterThan(0);
}));
});
});

describe('checks good.md and', () => {
it('finds nothing wrong with a valid file', () => {
waitsForPromise(() => atom.workspace.open(good)
Expand Down