Mac에서 ESLint와 함께 Atom Editor를 사용하고 있습니다. 스크립트 태그가있는 html 파일을 열어서 eslint-plugin-html과 linter-eslint를 설치해야합니다. 그러나 일부 html 파일에는 장고 코드가 있고 ESLint는 오류를보고합니다. 구문 분석 오류입니다. 예기치 않은 토큰 %. ESLint가 그러한 서버 측 코드를 어떻게 무시할 수 있는지 조언하십시오. 내 장고 구문을 가진 피Atom ESLint가 서버 측 언어 코드를 무시합니다.
A. 비활성화 specific file extensions
C.에 대한 linting 특정 lines, sections of code, or an entire file
B. 해제에 대한 linting : 여기 내 html 파일이
// some html here
<script>
var foo = {
{% for item in items %}
{% if item == "foo" %}
'foo': 'foo'
// etc