From e28945f7f50482a53a67d113b838cfe999c2d9b0 Mon Sep 17 00:00:00 2001 From: Craig Silverstein Date: Fri, 16 Oct 2015 16:56:25 -0700 Subject: [PATCH] Allow .fixture.js(x) files to have lines >80 chars. Summary: These files just hold test data, and it's not useful to make people wrap the test data which could have really long strings in it. Test Plan: In webapp, I temporarily modified javascript/content-library-package/components/thumbnail.jsx.fixture.js to remove the 'max-len' mention in the eslint-disable comment. I then ran ka-lint javascript/content-library-package/components/thumbnail.jsx.fixture.js which ran without error. Reviewers: kevinb, jlfwong Reviewed By: jlfwong Differential Revision: https://phabricator.khanacademy.org/D22500 --- linters.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linters.py b/linters.py index 1d1923e0..d11cef20 100644 --- a/linters.py +++ b/linters.py @@ -400,6 +400,11 @@ def _process_one_line(self, filename, output_line, contents_lines): if '@Nolint' in bad_line: return 0 + # Allow long lines in fixture files, which just hold test data. + if (' Emax-len ' in output_line and + filename.endswith(('.fixture.js', 'fixture.jsx'))): + return 0 + print self._maybe_add_arc_fix(output_line, bad_line) return 1