title: I can't make my custom eslint rule to work
body: <p>I'm using the <a href="https://astexplorer.net/" rel="nofollow noreferrer">AST</a> tool to build a custom esLint rule. I want to build a rule that throws a warning whenever I use hardcoded <code>strings</code> in a <code>function</code> call.</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>var greet = 'Hello';
  console.log('Hello') // throws an warning
  console.log(greet) // doesn't throw a warning
  </code></pre>
  
  <p>I have built the rules like so:</p>
  
  <pre><code>module.exports = {
    rules: {
      'no-hardcoded-strings': {
        create(context) {
          return {
            Literal(node) {
              if (node.raw) {
                context.report(node, 'Do not use hardcoded strings');
              }
            },
          };
        },
      },
    },
  };
  </code></pre>
  
  <p>It doesn't work, this is the <a href="https://astexplorer.net/#/gist/ac3ee5659c9ef928a26062771925afa3/407268a9c459375884724132b0d3e1e8d1436b61" rel="nofollow noreferrer">AST playground</a>. You can see the difference between the two Literals which is the property <code>raw</code>. However, my rule doesn't work.</p>
  
  <h2>Edit</h2>
  
  <p>Included the <code>.eslintrc.js</code> file:</p>
  
  <pre><code>  plugins: ['custom-rule'],
    extends: [
      'airbnb-base',
      'plugin:cypress/recommended',
      'plugin:prettier/recommended',
      'plugin:json/recommended',
    ],
    settings: {
      'import/resolver': 'webpack',
    },
    rules: {
      'import/prefer-default-export': 'off',
      'import/no-default-export': 'warn',
      'eqeqeq': 'warn',
      'import/no-extraneous-dependencies': 'off',
      'camelcase': 'error',
      'no-unused-expressions': 'error',
      'custom-rule/no-hardcoded-strings': 1
    },
  </code></pre>