Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ESLint + phantomjs not working

オープン
#1,529 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
eslint, javascript
領域
tooling

調査の方向性

phantomjs-node/src/shim/index.js の ESLint 出力から始め、phantomjs 環境と airbnb-base 設定を含む .eslintrc.json の設定と比較してください。報告された globals と imports が解決されない理由を特定し、その後、意図された PhantomJS コードでこれらのエラーが発生しなくなっていることを確認し、以前の fbjs/strict の動作が引き続きサポートされているかを明確にしてください。

索引モデルが issue の本文から書いたものです。

説明

Context

I am converting all of https://github.com/amir20/phantomjs-node to use AirBnB lint with prettier. I followed this tutorial to configure eslint, flow and prettier.

Problem

Everything seemed ok and I was going through some of the coding styles that --fix couldn't fix. A few looked like the below.

phantomjs-node/src/shim/index.js
    3:1   error    'webpage' should be listed in the project's dependencies. Run 'npm i -S webpage' to add it                                                                             import/no-extraneous-dependencies
    3:21  error    Unable to resolve path to module 'webpage'                                                                                                                             import/no-unresolved
    3:21  error    Missing file extension for "webpage"                                                                                                                                   import/extensions
    4:1   error    'system' should be listed in the project's dependencies. Run 'npm i -S system' to add it                                                                               import/no-extraneous-dependencies

I did some research and couldn't find anything about this. I was under the assumption that /* eslint-env phantomjs */ should fix this. I am a little stumped because it seems like AirBnB's base config for eslint doesn't work with phantomjs. Is this true?

Here is my .eslintrc.json

{
  "env": {
    "browser": true,
    "commonjs": true,
    "es6": true,
    "node": true,
    "jest": true,
    "phantomjs": true
  },
  "extends": "airbnb-base",
  "parser": "babel-eslint",
  "plugins": ["import"]
}

Questions

  1. How do I get phantomjs env globals and imports to work with AirBnB coding style?
  2. This used to work with "extends": "fbjs/strict". Was it disabled or removed?
主要言語
JavaScript
スター
148k
フォーク
26.6k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

airbnb/javascript のほかの issue

airbnb/javascript の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。